I use the passport-google-oauth module to authenticate users on a web application I built using Express.js. The logout event is handled this way:
app.get('/logout', function(req, res) {
console.log("logged out!");
req.logout();
res.redirect('/');
});
While this does redirect the user to the login page (at /), I'm not sure it really logs him out. After clicking on logout, when I open Gmail in a new tab, I remain logged in there (and no, I hadn't logged into Gmail earlier). How can I fix this? Also, what does req.logout() do to log the user out?