Replies: 2 comments
-
It might be helpful to know that NextAuth.js can also update JWT using middleware
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I have indeed a similar problem at the moment. Can you share your code? |
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
-
Greetings, I recently integrated NextAuth.js into a project using JWT for authentication. While it works great, I noticed that handling token expiration requires additional logic to refresh tokens without logging users out abruptly. I solved this by setting up automatic token refreshing using the jwt callback to check the expiration and request a new token before it expires. This way, users experience seamless login sessions. I can share my implementation if anyone is interested or struggling with a similar setup.
Beta Was this translation helpful? Give feedback.
All reactions