Closed vamsii777 closed 3 months ago
Hey,
I got almost same behavior. Also, multiple refresh token request are sent to my backend which cause sometimes 401 on the get session route and in this case, the access token is not set in cookies..
I'm thinking about switching to the Authjs provider + call to my backend from callbacks.
It's not really clean but I hope it's more stable...
It appears that the pull request #858 has been merged which fixes #834. We will need to wait for the new release to confirm that the issue is fully resolved.
Setting refreshOnlyToken: false
resolves the issue as the refresh token cookie updates correctly during the refresh process.
Environment
Darwin
v20.16.0
3.12.4
3.12.0
2.9.7
npm@10.8.1
-
compatibilityDate
,devtools
,modules
,pinia
,fonts
,auth
,runtimeConfig
vuetify-nuxt-module@0.16.1
,@pinia/nuxt@0.5.3
,@nuxt/fonts@0.7.2
,@sidebase/nuxt-auth@0.8.2
-
Reproduction
Steps to Reproduce:
auth
configuration:enableOnWindowFocus
is set tofalse
.Expected Behavior:
enableOnWindowFocus
is set tofalse
.Actual Behavior:
enableOnWindowFocus
being set tofalse
.Describe the bug
When refreshing the authentication token, the refresh token cookie is not being updated correctly. This causes the backend server to reject the token as invalid, resulting in the user being automatically signed out. Additionally, the token refreshes when switching tabs, even though
enableOnWindowFocus
is set tofalse
.Additional context
This issue could be caused by improper handling of the refresh token cookie during the refresh process.
Please investigate this issue as it disrupts the user experience by causing unexpected sign-outs, unnecessary token refreshes, and as described in issue #859.
Logs
No response