Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
3 replies
EQ

Next Auth JWT

Hello,

I have 3 questions regarding NextAuth with JWT as session strategy:
1. When I return in the authorize function something like
return {
  email: user.email
};

I get an error that authorize does not match the User type of NextAuth. I have tried to override this in next-auth.d.ts file, unfortunately it did not work.

2. It it save to also send the user role in authorize?
3. Does the JWT refresh automatically when it expires when using CredentialsProvider?
Was this page helpful?