Can't get the guilds of the current user (Discord) #1629
-
I'm trying to get the guilds that the user is on Hello, i'm making my bot's dashboard, buy and i got the following error: (node:60208) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'accessToken' of null The database and the auth system are working, but I can't proceed because of this error. Source Code Screenshots: [...nextauth].js
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
@ Edit: the solution is under this comment. |
Beta Was this translation helpful? Give feedback.
@ Edit: the solution is under this comment.
The discord provider only gives the default information mentioned on the next-auth api, but everything is present on the callbacks, solving a promise while injecting the data on token callback allows us to get it from the session context