Wednesday 6 April 2016

Noob with a problem with socket cookie

Hi there,I've only recently started using node and been doing only locally recently had to put my server running remotly on a computer but for some reason its breaking.The setup: the remote server is a ubuntu i have node, express, passport (with google strategy), socket.iowhat happening, well after google redirects me back, passport does its magic and setups a cookie on the client side called connect.sid with a number for the session which is also stored on memory on the server side. Both the server and the client side match. Since im also using sockets, im using the socket.request.headers.cookie to check if its on the store, if it is then i can find out who is the user and use that user value for db magic. On the localhost this works, when on the server http://ift.tt/1TCNGTo u can see the socket.request.headers.cookie doesnt return a connect.sid value but i have it both on the client side and on the server store (the last print)i have some code snippets here http://ift.tt/1oDgGgW

Submitted April 07, 2016 at 12:09AM by GeckoNinja

No comments:

Post a Comment