passport: TypeError: done is not a function
I’m trying to use an OAuth1.0 provider, and after calling done in the verify function the serialization fails
passport.serializeUser = (user,done) ->
done(null,user)
passport.deserializeUser = (obj,done) ->
done(null,obj)
TypeError: done is not a function
at Authenticator.passport.serializeUser (/app/scripts/jira.coffee:22:2, <js>:24:12)
any thoughts?
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 3
- Comments: 21
+1
In my case is when using LocalStrategy, the error goes away when removing options
(passReqToCallBack: true)
Found what was causing my case of
done is not a function
. When usingpassReqToCallback: true
the parameters need to be updated:function(req, username, password, done)
Hey guys,
Is this about passing extra parameter from the form to the passport.js? I used req.body.<fieldname> to pass extra field like ‘Role’ and used that in my code. That way I didn’t have to edit the passport’s code and I was able to add that information in my mongo database.
I might be sounding completely stupid but this is what I understood from your discussion above.
Abi