Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Type of "done" gets modified, passport crashes. #130

Open
LaKing opened this issue Jan 29, 2017 · 0 comments
Open

Type of "done" gets modified, passport crashes. #130

LaKing opened this issue Jan 29, 2017 · 0 comments

Comments

@LaKing
Copy link

LaKing commented Jan 29, 2017

As soon as I enable passport.socketio, ...

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
}));

Anyone any ideas?

@LaKing LaKing changed the title Type of "done" gets modified in passport. Type of "done" gets modified, passport crashes. Jan 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant