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'm using the <UserProvider> component to wrap my Next.js application in _app.tsx.
If I leave my browser tab open and revisit it after a day or so, I'll notice a call to /api/auth/me that returns 401 Unauthorized. This seems to happen because my appSession cookie expires or something. This causes subsequent XHR calls to my API to fail because the request is unauthorized. However, because I'm still logged into Auth0, if I go to /api/auth/login, I get redirected back to my page and my client-side cookie gets refreshed and everything works fine.
According to some other tickets (#2, #4, #7) I'm supposed to set storeRefreshToken, but according to the V1 migration guide, that option has been removed. Nothing else in the documentation seems to mention refresh tokens, and <UserProvider> doesn't seem to take any configuration.
What should I do to make sure my client-side cookie is always valid and stays refreshed?
Environment
Version of this library used: 1.3.1
Version of the platform or framework used, if applicable: Next.js 10.2
Other relevant versions (language, server software, OS, browser): Chrome 90.0
Other modules/plugins/libraries that might be involved: Node v15.13
The text was updated successfully, but these errors were encountered:
According to some other tickets (#2, #4, #7) I'm supposed to set storeRefreshToken, but according to the V1 migration guide, that option has been removed.
By default all tokens (id token, access token and refresh token) are stored by default - so you don't need to worry about storeRefreshToken
Description
I'm using the
<UserProvider>
component to wrap my Next.js application in_app.tsx
.If I leave my browser tab open and revisit it after a day or so, I'll notice a call to
/api/auth/me
that returns 401 Unauthorized. This seems to happen because myappSession
cookie expires or something. This causes subsequent XHR calls to my API to fail because the request is unauthorized. However, because I'm still logged into Auth0, if I go to/api/auth/login
, I get redirected back to my page and my client-side cookie gets refreshed and everything works fine.According to some other tickets (#2, #4, #7) I'm supposed to set
storeRefreshToken
, but according to the V1 migration guide, that option has been removed. Nothing else in the documentation seems to mention refresh tokens, and<UserProvider>
doesn't seem to take any configuration.What should I do to make sure my client-side cookie is always valid and stays refreshed?
Environment
The text was updated successfully, but these errors were encountered: