i try to decrease the expiration time from my access_token, but when i set a new value in my API Details under Auth0 Management Api → Token Settings → Token Expiration → 30000ms
In my session object under accessTokenExpiresAt the value is still a different. In my case 1706293978ms…
What can i do to change this expiration?
I’m on a nextjs project an use the @auth0/nextjs-auth0 package.
It looks like you have changed the access token expiration time correctly. However, let me clarify that the token expiration is in seconds instead of milliseconds. See below:
Also, let me add that the /authorize endpoint is called when you use the login handler in Auth0 Next.js SDK. You can verify this by checking the network activity.
I tried to put the offline_access to the options of handleLogin. But i cannot find the attribute within authorizationOptions where to put it in? when i put it to scope i get the error, that scope only can have openid. And in the documentation AuthorizationParams | @auth0/nextjs-auth0 i cannot find anything about offline_access. And when i put it to the .env like so: `AUTH0_SCOPE = ‘offline_access’ i get the following error:
⨯ node_modules/@auth0/nextjs-auth0/dist/auth0-session/get-config.js (197:14) @ get
⨯ TypeError: "authorizationParams.scope" with value "offline_access" fails to match the contains openid pattern
at Page (./src/app/page.tsx:19:90)
at stringify (<anonymous>)
digest: "2392272747"
Edit: Well … just adding openid as well to the scope did it and now i get a refreshToken. scope: 'openid offline_access