You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing odd behavior with the passport.authenticate method's callback. I'm using the following signature. passport.authenticate('twitter', function (err, user, info) {});
I'm passing the callback from a custom handler method like so return done(err, user, info);
Sometimes info, when I pass it into my done callback, is null or undefined, which is the expected behavior in certain cases. In these cases instead the info parameter in the Authenticate callback is passed as an empty object rather than undefined or null. I would expect it to maintain the value that I sent to the done() callback.
I originally thought maybe this was behavior of the express middleware, but it doesn't appear that is the case. I'm using the middleware, and custom handler method for passport-facebook & the info parameter maintains it's value; undefined when I either omit the value or explicitly specify undefined.
Anyone see this type of bahavior, or understand why? It seems interesting to me that I'd see different behavior between the Twitter & Facebook packages in this case.
The text was updated successfully, but these errors were encountered:
I'm experiencing odd behavior with the passport.authenticate method's callback. I'm using the following signature.
passport.authenticate('twitter', function (err, user, info) {});
I'm passing the callback from a custom handler method like so
return done(err, user, info);
Sometimes
info
, when I pass it into mydone
callback, is null or undefined, which is the expected behavior in certain cases. In these cases instead theinfo
parameter in the Authenticate callback is passed as an empty object rather than undefined or null. I would expect it to maintain the value that I sent to thedone()
callback.I originally thought maybe this was behavior of the express middleware, but it doesn't appear that is the case. I'm using the middleware, and custom handler method for passport-facebook & the
info
parameter maintains it's value;undefined
when I either omit the value or explicitly specifyundefined
.Anyone see this type of bahavior, or understand why? It seems interesting to me that I'd see different behavior between the Twitter & Facebook packages in this case.
The text was updated successfully, but these errors were encountered: