Hi, I have few questions about token expiration.
- We have the “Access external api” setting in Next.js Api routes: nextjs-auth0/EXAMPLES.md at main · auth0/nextjs-auth0 · GitHub
- we use deployed login page (AUTH0_ISSUER_BASE_URL)
In this setting, when the token is expired.
What does “nextjs-auth0” library do for us?
One thing I noticed,
- it calls /auth/me on page refresh and redirect user to relogin
And that’s all?
Is there others automatic logics to direct users to the relogin page?
Generally my goal here is to redirect users to relogin when 401 is started with our external api.
Then, as far as I understand, we need to do either
opt 1: reload page when frontend catches 401
opt 2: use the offline more and obtain refresh token to call our api
Just want to make sure if my understanding is correct.