When setting the access token max age, I use the same expiration value (in seconds) as the refresh_token. Initially, the token appears to have the correct expiry date in the browser's cookie storage. However, once the access token expires (10 minutes in my case), it is removed from the cookies.
If I close the browser and return after more than 10 minutes, I am automatically signed out and redirected to the login screen. I would expect the library to call the refresh token endpoint to obtain a new session instead of requiring users to sign in again, especially when a valid refresh_token is still available in the cookies.
Also the access token is removed from cookies storage even when the expired date was set the same as refresh token which is 5 days in my example.
Environment
Darwin
v20.18.0
3.13.2
3.15.0
2.9.7
pnpm@9.12.2
-
default
@nuxt/eslint@0.5.7
,@nuxtjs/tailwindcss@6.12.2
,shadcn-nuxt@0.10.4
,@sidebase/nuxt-auth@0.9.4
-
Reproduction
Nuxt config:
Describe the bug
When setting the access token max age, I use the same expiration value (in seconds) as the refresh_token. Initially, the token appears to have the correct expiry date in the browser's cookie storage. However, once the access token expires (10 minutes in my case), it is removed from the cookies.
If I close the browser and return after more than 10 minutes, I am automatically signed out and redirected to the login screen. I would expect the library to call the refresh token endpoint to obtain a new session instead of requiring users to sign in again, especially when a valid refresh_token is still available in the cookies.
Also the access token is removed from cookies storage even when the expired date was set the same as refresh token which is 5 days in my example.
Additional context
No response
Logs
No response