Manage session with h3 - useSession overrides maxAge/expires #20
Replies: 1 comment
-
Hello, quick update, I noticed that the problem comes more from the call of session.update(...)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have a project under nuxt 3 and I manage my sessions myself for various reasons.
I have a plugin for server initialization which allows the session to be created:
And in this session I subsequently add the token of the connected user
When I fetch the session contents elsewhere (e.g. in my server/utils/customFetch), my session loses properties like expires, sameSite, etc..
I tried with maxAge and I have the same behavior.
This is how I recover the session
What am I doing wrong? why are the properties overwritten?
Beta Was this translation helpful? Give feedback.
All reactions