node_modules/passport/lib/passport/index.js:321
if (err || user) { return done(err, user); }
^
TypeError: done is not a function
As far as I see at some point, done changes from a function to the request object.
This is the code I use.
var passportSocketIo = require("passport.socketio");
io.use(passportSocketIo.authorize({
cookieParser: cookieParser, // the same middleware you registrer in express
key: 'connect.sid', // the name of the cookie where express/connect stores its session_id
secret: 'why-is-done-not-a-function', // the session_secret to parse the cookie
store: mongoStore, // we NEED to use a sessionstore. no memorystore please
//success: onAuthorizeSuccess, // *optional* callback on success - read more below
//fail: onAuthorizeFail, // *optional* callback on fail/error - read more below
}));
As soon as I enable passport.socketio, ...
As far as I see at some point, done changes from a function to the request object.
This is the code I use.
Anyone any ideas?