How do I make providerAccountId accessible on session object #1486
Answered
by
StefanSelfTaught
satoufuyuki
asked this question in
Help
-
I want |
Beta Was this translation helpful? Give feedback.
Answered by
StefanSelfTaught
Mar 9, 2021
Replies: 1 comment 1 reply
-
I think you can get your callback: {
async session(session, token) {
session.providerAccountId = token.providerAccountId
return session
},
async jwt(token, user, account, profile, isNewUser) {
if (profile?.id) {
token.providerAccountId = profile.id
}
return token
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
satoufuyuki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you can get your
providerAccountId
in theprofile
oraccount
object in the JWT callback and then pass it to the session like this: