session icon indicating copy to clipboard operation
session copied to clipboard

not persistent cookie values after enter in another route

Open lokize opened this issue 3 years ago • 3 comments

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?

lokize avatar Oct 22 '22 00:10 lokize

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

mirker21 avatar Dec 01 '23 16:12 mirker21

Having same problem

kkmr2011 avatar Jan 13 '24 15:01 kkmr2011

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

joewagner avatar Jan 13 '24 17:01 joewagner