I keep getting logged out even though I have set a long session in auth0 dashboard

I keep getting logged out even though I have set a long session in auth0 dashboard. I use next.js.

I have set the session in the dashboard to 1 year, but I get logged out after a week. In the backend I have a function that fetches refresh and access token and updates the session based on these.
await updateSession(req, res, {
…session,
accessToken: tokenData.access_token,
refreshToken: tokenData.refresh_token,
idToken: tokenData.id_token,
accessTokenExpiresAt:
Math.floor(Date.now() / 1000) + tokenData.expires_in,
});

I can see that my appSession cookie get’s extended by a day at a time. Do I need to sync the nextjs-auth0 sdk with the auth0 configuration in some way?
Do I need to do a re-authentication of some sort to the nextjs-auth0 sdk?