Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Next Auth JWT - Theo's Typesafe Cult
TTC
Theo's Typesafe Cult
•
4y 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
};
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
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
?
Theo's Typesafe Cult
Join
26,564
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
next auth jwt session
TTC
Theo's Typesafe Cult / questions
3y ago
[next-auth][error][JWT_SESSION_ERROR]
TTC
Theo's Typesafe Cult / questions
3y ago
JWT Session Error in Next Auth
TTC
Theo's Typesafe Cult / questions
4y ago