You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that session data is not persisting between requests, I've tried storing in memory and disk, but either way data I store in the session does not persist.
I have console.log(req.session) in my authenticated policy, as well as console.log(req.session) in my login controller after setting the session variables (req.session.authenticated = true; and req.session.user = user;).
The first log shows no auth variable or user data as expected, the call after authenticating does, as expected, but when I load a page it's expected that the first log will now contain the data that was set, it doesn't, the session data is reset completely.
The text was updated successfully, but these errors were encountered:
Nope, user error, I misunderstood the store property of the session configuration object - I thought it was to specify which adapter to use for session storage, removing it from my config made sessions work.
What is actually meant to be used for the store property? The docs say nothing other than it needs to be an object, nothing on what that object should contain.
Following the guide at: https://github.com/balderdashy/sails/wiki/Guide:-Login-Example
It seems that session data is not persisting between requests, I've tried storing in
memory
anddisk
, but either way data I store in the session does not persist.I have
console.log(req.session)
in myauthenticated
policy, as well asconsole.log(req.session)
in my login controller after setting the session variables (req.session.authenticated = true;
andreq.session.user = user;
).The first log shows no auth variable or user data as expected, the call after authenticating does, as expected, but when I load a page it's expected that the first log will now contain the data that was set, it doesn't, the session data is reset completely.
The text was updated successfully, but these errors were encountered: