I am using express-session module for session handling in my express.js app
My express.js application creates session for user and admin privileges.
I have req.session.user & req.session.admin
The problem I have is I don't know how to close 1 session and not the other.
You can close a session with this command: req.session.destroy()
But that destroys both sessions. I tried using req.session.user.destroy() with no luck. It is not a valid command.
So how can I destroy 1 session and not the other?