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
I used both req.logout() and req.session.destroy() and works fine.
req.logout()
req.session.destroy()
server.get('/logout', (req, res) => { req.logout(); req.session.destroy(); res.redirect('/'); });
Just to mention, i use Redis as session store.