-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
passport.authenticate loses session on success #314
Comments
More info ... the express session remains valid after the success redirect; it's the passport session that's empty after the redirect. |
More info ... when the passport.session fails to exist after redirect, deserializeUser doesn't get called. In this scenario I can login using facebook and then logout - repeat 3 - 4 times and works great, then it fails. |
Is it the same race condition mention in this issue? #306 |
I had the same problems! I ended up using https://github.com/expressjs/cookie-session instead of https://github.com/expressjs/session. It worked out of the box. I did not have to change a single line of code except for the config. |
I have passport working very well with facebook and google as providers. I am testing login and logout cycles, and it seems the session is dropped from time to time. I'm using connect-dynamodb for the session store. In the auth callback as follows, the req.user object is always available:
But then the /setup route, as below, will sometimes show req.user as undefined.
Is this normal? Is the session supposed to drop after a login is successful?
The text was updated successfully, but these errors were encountered: