Answer the question
In order to leave comments, you need to log in
How to get a session?
What could be wrong?
function (callback) {
handshake.cookies = cookie.parse(handshake.headers.cookie || '');
var sidCookie = handshake.cookies[config.get('session:key')];
var sid = cookieParser.signedCookie(sidCookie, config.get('session:secret'));
console.log(handshake.cookies); // { 'connect.sid': 's:CCPj8Xgmh7Quw5uwYIUjXaDyEde1wl8N.jgsBG0cy/RkJTul83dr4xjtEwZ/l0TGUEQf/phafRO8', io: 'xp0-fmaUzW8DIAulAAAA' }
console.log(sidCookie); // undefined
console.log(sid); // undefined
loadSession(sid, callback);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question