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
Logout is not working #202
Comments
Hi, req.logout() is not reliable, even though it's how documentation states. Please try that one in your handler: req.session.destroy((err) => {
if(err) return next(err)
req.logout()
res.sendStatus(200)
}) |
Ran into same issue, the |
@bartekwitczak Thank you so much. Apparently that order is super important. I spent probably 4 hours trying to fix this issue until I found your solution. FYI, I'm using create-react-app + node.js + express + passport.js |
using passport-github, I have similar problem : when the logout route is called, the client application is no more connected. But if I click on login, the application does not redirect me to the github authentication page, and my client is still connected. |
Seems I am facing the same issue. Invoking the logout as mentioned in the documentation. But when attempting to login again with facebook it directly takes me in. How to remove the facebook stored login session so that fresh login can be made? |
Same problem with Facebook logout! |
Below code is not logging out actually. still session is there.
app.get('/logout',function(req,res){
req.logout();
res.redirect('/');
});
The text was updated successfully, but these errors were encountered: