Replies: 2 comments 3 replies
-
So, no way to know when the token is about to expire ? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hi guys, this might help. for SSR, you can use auth() for SSR, better you create a call to reuse it or just do it directly. for CSR, directly call the useSession(). Both of them has update for token expiration Hope these helps HEHE |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I use Next.js 14 & Auth.js 5
I want to check if session is about to expire to ask user if he/she is still here (reading, talking, watching a vidéo ...)
But, when I SWR the api route and get the token with auth(), the function automatically rotates the expiry date so it will never expire.
How should I do to get the expires value of the current token without renewing it ?
Regards
Beta Was this translation helpful? Give feedback.
All reactions