-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avatar via OIDC Provider #202
base: main
Are you sure you want to change the base?
Conversation
- Avatar Url Format Explanation
- Mimetype is now inferred by the Response header. - Extension is now derived from the Mimetype
I've seen those curious eyes 👀 Joking apart, if you want me to change anything before merging do not hesitate! |
I'm running some tests on my end, trying to make sure that everything is secure when loading the image. |
Unfortunately, as cool as this is, I'll have to put it on the backburner for now, since college is starting back up and I don't have much time for maintaining and verifying big new features like this. |
Thank you so much for implementing this feature, it's just what I needed! |
I tested your plugin and it works great! Although it was a little bit confusing to guess that I had to type @{avatar} if I had an However I was able to figure it out and it works like a charm! |
Description
I've added a config field to the OIDC provider that can set the avatar of a user based on a URL template that can use Claim Types as values.
If the field is empty, the behavior is the same as it was, meaning the current avatar set by the user is kept as is.
If the field is filled, then each time a user connects with OIDC, the user avatar is updated.
Examples
Typical
If the oidc provider sends an
avatar_url
claim type, we can then set the AvatarURLFormat as@{avatar_url}
Advanced
If we use a discord linked provider that provides a
discord_id
and anavatar
claim type, we can then set the AvatarURLFormat ashttps://cdn.discordapp.com/avatars/@{discord_id}/@{avatar}.jpg?size=512
Limitations
If multiple claims exists with the same claim type, only the first one will be applied to the AvatarURLFormat
Bug fixes