From 200aeec145758cefc9111d9ef4d9581e68beda6a Mon Sep 17 00:00:00 2001 From: Curtis Lacy Date: Tue, 25 Jun 2013 10:18:58 -0400 Subject: [PATCH 1/2] Changed package.json to correctly point at the main file. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9da779b..bd65847 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "passport.socket.io", "version": "0.0.0", "description": "passport.socket.io allows your socket.io connections to have access to your passportjs login session.", - "main": "index.js", + "main": "libs/index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, From 753dc92482124e547a4e4707f1f3f1aa29afdf4d Mon Sep 17 00:00:00 2001 From: Curtis Lacy Date: Tue, 25 Jun 2013 10:44:27 -0400 Subject: [PATCH 2/2] Read our data from data.cookies, rather than data.signedCookies. --- libs/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/index.js b/libs/index.js index 032eab8..9f084ee 100644 --- a/libs/index.js +++ b/libs/index.js @@ -9,7 +9,7 @@ var passportSocketio = function(cookieParser, sessionStore, cookie){ if(err){ return accept('COOKIE_PARSE_ERROR'); } - var sessionId = data.signedCookies[_cookie]; + var sessionId = data.cookies[_cookie]; _sessionStore.get(sessionId, function(err, session){ console.log('in auth: session: ', session); console.log('in auth: sessionId: ', sessionId);