Open ericbian22 opened 4 years ago
Hello @ericbian22 did you end up finding a solution to this? :)
This worked for me #246
This worked for me #246
Hi, I enabled the force re-authenticate option in the facebook developer console but it is doing the same thing
Same problem here ðŸ˜.
Here is my code
passport.use(new FacebookStrategy({ clientID: process.env.FACEBOOK_APP_ID, clientSecret: process.env.FACEBOOK_APP_SECRET, callbackURL: "http://localhost:3000/auth/facebook/Welcome", profileFields: ["id", "email"], authType: 'reauthenticate' }, function (accessToken, refreshToken, profile, cb) { User.findOrCreate({ username: profile.id },{provider: "facebook",email: profile._json.email},function (err, user) { return cb(err, user); } ); } ));
Later I used
app.get("/Logout",function(req,res){ req.session.destroy((err) => { req.logout() res.redirect("/"); }); });
But when I log out, and it logs in with the same account without authentication, so how do I fix this issue?
This following is enough to logout from your session.
app.get("/logout", function(req, res){
req.logout();
res.redirect("/");
});
Here is my code
Later I used
But when I log out, and it logs in with the same account without authentication, so how do I fix this issue?