Replies: 2 comments 4 replies
-
Shouldn't the user queried in authorize function should contain the |
Beta Was this translation helpful? Give feedback.
4 replies
-
this example will help you const callbacks = {
async jwt(token, user) {
if (user) {
token.accessToken = user.token
token.name = user.userName
token.picture = user.avatar
}
return token
},
async session(session, user) {
session.accessToken = user.accessToken
return session
},
} |
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.
-
Describe the bug
Hi I define option of next-auth like this
I use custom Users model
Everything work well, user can login with normal but the
session =useSesstion()
don't returnmyCustomData
anymoreI tried to remove Providers.Credentials and turn off jwt I will get the custom data I need.
Steps to reproduce
I think don't need it, i just trying learn how to use this package
Expected behavior
I need more data in
useSesstion
hook, the user can have more data like user's credit, user's bought subscription, ratting,... which will show in header. I don't want query database again for optimizeScreenshots or error logs
No screenshot, this is not an error, its something missing
Beta Was this translation helpful? Give feedback.
All reactions