Improve user updates from providers #9764
nbouvrette
started this conversation in
Ideas
Replies: 2 comments
-
Ran into this issue - Google provider seems to include it in the profile.picture parameter but Azure AD Provider does not, which necessitates this type of code. Would be great if these values were consistently there somehow, updating images on login is not intuitive. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Same issue. I'm including the groups that are associated to a user in AWS Cognito, and if a user is removed from a group, then need a way to update that in our database record of the user. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description 📓
There are some 3rd party providers (like LinkedIn) that change image URLs. I noticed that after users have had accounts for a while their avatar image is no longer working.
Unless I misunderstood, the suggested way to update user info is to use a
signIn
callback? This is how I managed to fix images...While this seems to work, here are my concerns:
profile
data returned in the callback is "raw" and the providers do not expose their logic to extract imagesSuggestion/idea:
Return the parsed
user
object from the provider in the callback would make this a lot simplerBut maybe even better, having some sort of flag like
updateImage: true
in the provider config that would handle this automatically by calling the adapter'supdateUser
function when images change?How to reproduce ☕️
Not applicable (just use the Next-auth LinkedInProvider and you will see images break after a while).
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions