You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Single Page Application built using NextJS and the auth0-nextjs library to manage user authentication and web sessions. I am using the pages router and routing all of my FrontEnd requests through the API route handlers where each handler looks similar to the following
The problem is that we have seen issues intermittently where the requests to the backend are failing with 401 error - exp claim timestamp check. Logging the user out of the session and re-logging back in fixes this issue.
I would expect the browser to handle an stale session automatically by logging the user out and/or refreshing the tokens using refresh tokens if necessary, however this doesn't seem to be happening here. I have a hard time reproducing the issue as it only seems to appear after a certain amount of time passes. Could it be that the library is respecting some fixed timeout whereas the actual session timeout is shorter?
Reproduction
I'm unable to share specifics on how to reproduce this issue. I was hoping for some guidance on the behavior of the auth0-nextjs library with regards to handling token refreshing.
Additional context
The API server is an express Node.js server using the express-oauth2-jwt-bearer library version 1.1.0. The server is the one throwing the error, however I believe it's not an issue with the server because clearing the browser cache fixes the issue.
nextjs-auth0 version
3.5.0
Next.js version
7.84.0
Node.js version
20.3.3
The text was updated successfully, but these errors were encountered:
Checklist
Description
I have a Single Page Application built using NextJS and the auth0-nextjs library to manage user authentication and web sessions. I am using the pages router and routing all of my FrontEnd requests through the API route handlers where each handler looks similar to the following
The problem is that we have seen issues intermittently where the requests to the backend are failing with 401 error -
exp claim timestamp check
. Logging the user out of the session and re-logging back in fixes this issue.I would expect the browser to handle an stale session automatically by logging the user out and/or refreshing the tokens using refresh tokens if necessary, however this doesn't seem to be happening here. I have a hard time reproducing the issue as it only seems to appear after a certain amount of time passes. Could it be that the library is respecting some fixed timeout whereas the actual session timeout is shorter?
Reproduction
I'm unable to share specifics on how to reproduce this issue. I was hoping for some guidance on the behavior of the auth0-nextjs library with regards to handling token refreshing.
Additional context
The API server is an express Node.js server using the
express-oauth2-jwt-bearer
library version1.1.0
. The server is the one throwing the error, however I believe it's not an issue with the server because clearing the browser cache fixes the issue.nextjs-auth0 version
3.5.0
Next.js version
7.84.0
Node.js version
20.3.3
The text was updated successfully, but these errors were encountered: