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
If your browser comes in with a session cookie, but that cookie is long gone (you restarted the server and were using memory cookies), a new session object is created where
req.session.id = <old cookie from browser>
req.sessionID = <new ID that should have been stored in session.id>
That's because the generate() function looks like this:
var generate = store.generate = function(){
var base = utils.uid();
var sessionID = base + "." + hash(base);
req.session = new Session(req, sessionID);
req.sessionID = sessionID;
};
and passing in sessionID to the Session constructor does nothing with sessionID because it's not an object. The Session constructor initializes session.id with req.sessionID, but generate doesn't set req.sessionID until after the Session constructor.
The text was updated successfully, but these errors were encountered:
If your browser comes in with a session cookie, but that cookie is long gone (you restarted the server and were using memory cookies), a new session object is created where
That's because the generate() function looks like this:
and passing in sessionID to the Session constructor does nothing with sessionID because it's not an object. The Session constructor initializes session.id with req.sessionID, but generate doesn't set req.sessionID until after the Session constructor.
The text was updated successfully, but these errors were encountered: