express-passport-logout

express middleware to logout from passport

Express middleware to logout a user from passport and redirect somewhere.

It will

  • req.logout()
  • delete req.session
  • redirect to req.query.returnTo if exists, if not res.send(bye)
npm install express-passport-logout
var logout = require('express-passport-logout');
 
app.get('/logout', logout());

MIT - Auth0