I am working with express and socket.io. I have some req.session variables I wish to access from within socket.io. I read this post on socket.io and session and I am still very confused as to how I can get a req.session variable.
I am working with express and socket.io. I have some req.session variables I wish
Share
One way to accomplish this is by using your session store from inside your socket – which will have your all you session variables. This is how I do an authorization (compare cookie ID with session ID from database).