Closed ogomaemmanuel closed 1 year ago
Do we have any updates on this? I'm experiencing a similar problem where the user is logged out upon page refresh, regardless of the browser used. Interestingly, it functions correctly when executed on localhost.
Update: It appears that the user is automatically logged back in after approximately 30 seconds.
Do we have any updates on this? I'm experiencing a similar problem where the user is logged out upon page refresh, regardless of the browser used. Interestingly, it functions correctly when executed on localhost.
Update: It appears that the user is automatically logged back in after approximately 30 seconds.
Same problem here, works on localhost, not with domains, it remove cookie on refresh and so logs user out
I have the same problem when deploying to production. When refreshing the browser, the cookie is destroyed and logs the user out.
I have this issue too and I found out the cause.
When we attach the access_token
and/or refresh_token
to the session, it gets stored in the cookies, but since those tokens are too large, they get split into 2 (or more) different cookies.
Screenshot of the Application/Cookies tab on chrome:
I don't really know the internals of how this works, but when session-token
is splitted like that, it causes the error we are all experiencing. I'm also getting a JWE Initialization Vector missing or incorrect type
on the server logs.
If you don't attaching the JWT into the session, it should work even after page refresh.
I'm trying to find workarounds (or better yet, a fix) to this, but no luck so far. I'll comment here again if I find anything
There is another issue related to this: https://github.com/sidebase/nuxt-auth/issues/293
I will close this issue in favor of https://github.com/sidebase/nuxt-auth/issues/293. Please refer to it, for future updates about this issue!
Environment
Chrome Browser Moc Os Ventura
Reproduction
nuxt config