I haven't done anything in Backbone yet, but there are solutions here , here and here . As long as you get the session ID somewhere, you can get the session with cookie -package (the cookie was outsourced from the connect-Utils application):
if(handshakeData.headers.cookie) {
c = cookie.parse(handshakeData.headers.cookie);
sid = connect.utils.parseSignedCookie(c['connect.sid'], 'keyboard cat');
redis.get('sess:'+sid, function(error, result) {
session = JSON.parse(result);
handshakeData.uid = session.passport.user;
callback(null, true);
});
source
share