Update Avatar on OAuth Login
Hi there, so I have Discord OAuth as a login option for my website, however I'd like it so when you login with Discord, it updates the user's avatar to be the latest avatar from Discord - rather than only using the avatar when the user first signs up with Discord.
I was looking through the docs and seen that I could do a before and after database hook for the social account, however when printing the account, as well as the provided context, I cant see anywhere the response from Discord when logging in via OAuth, aka the object that contains the user's email, avatar, etc.
Would appreciate if anybody could guide me in the right direction, thanks in advance!
I was looking through the docs and seen that I could do a before and after database hook for the social account, however when printing the account, as well as the provided context, I cant see anywhere the response from Discord when logging in via OAuth, aka the object that contains the user's email, avatar, etc.
Would appreciate if anybody could guide me in the right direction, thanks in advance!
Solution
update on the above in-case anybody wants to know what i done to "resolve" it - https://cdn.rainnny.club/hnUdnBVr.png little jank but this works i suppose
