Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not persistent cookie values after enter in another route #918

Open
lokize opened this issue Oct 22, 2022 · 3 comments
Open

not persistent cookie values after enter in another route #918

lokize opened this issue Oct 22, 2022 · 3 comments

Comments

@lokize
Copy link

lokize commented Oct 22, 2022

hi, in my application i seted a values to cookie params, like img:
image

image

but when i change to another route of application when i try to get session the values of cookies params is empty...

image

how to save session in memory to prevent to lose values?

@mirker21
Copy link

mirker21 commented Dec 1, 2023

I am experiencing the same problem, am hoping to find a solution.

@kkmr2011
Copy link

Having same problem

@joewagner
Copy link
Member

joewagner commented Jan 13, 2024

HI @lokize @kkmr2011 and @mirker21
Looks like you might not be using the session.cookie property correctly. The valid settable properties are listed in the readme.
They are cookie.expires and cookie.maxAge, you can't set role or client and if you did it would not have any effect.
If you are hoping to save those values in the session, you might want to try doing something like
req.session.userClient = response.data.user.profile.client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants