How to use the token in session in redirect like this #12384
Unanswered
vicky142803
asked this question in
Help
Replies: 0 comments
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.
-
async session({ session, token }) {
if (session.user) {
session.user.id = token.id as string;
}
return session;
},
async redirect({ url, baseUrl}) {
const crossDomainToken = generateCrossDomainToken({
id: user.id,
email: user.email,
allowedDomains: ['my.website.com', 'another-website.com']
})
Beta Was this translation helpful? Give feedback.
All reactions