I am having trouble getting my system to log out with PassportJS. It seems the logout route is being called, but its not removing the session. I want it to return 401, if th
None of the answers worked for me so I will share mine
app.use(session({ secret: 'some_secret', resave: false, saveUninitialized: false, cookie: {maxAge: 1000} // this is the key }))
and
router.get('/logout', (req, res, next) => { req.logOut() req.redirect('/') })