Replies: 2 comments 1 reply
-
Hey @nixxxo, Before I try to provide some guidance, I'd like to make sure I understand what you're trying to accomplish:
Assuming that the above requirements are what you're looking for, and also assuming that the
Following this process will ensure that both the request to the Discord API and the save to your API complete in full before allowing the user to sign-in. Additionally, you can decide to Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
After doing some digging, I found that you can just overwrite the authorization property in the DiscordProvider method:
After doing the above, I was able to access the users guilds using the "/api/users/@me/guilds" endpoint with no problems. |
Beta Was this translation helpful? Give feedback.
-
Question 💬
Hello,
I've been reading the docs and trying stuff out for sometime now, with callbacks, changing scopes, playing with prisma and so one. Despite all of this, I just can't figure out how to log the guilds the user is in. I tried using the access token to send like a "second" fetch request to "https://discordapp.com/api/users/@me/guilds" instead of the default "https://discordapp.com/api/users/@me", however it doesn't really work to fetch information withing the NextAuth().
So my question is how can I log every server the user is in, the moment he authenticates with discord?
p.s I know UseState() cannot be there but honestly just figuring out where it has to be might fix the issue for me, just how to write the guilds to a variable and from there on i can write them to the db and do whatever i want.
Any help is appreciated.
How to reproduce ☕️
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions