Open wzup opened 7 years ago
Maybe not wrong, but rather incomplete. According to the Passport documentation:
To avoid this, set the strategy's
passReqToCallback
option totrue
. With this option enabled,req
will be passed as the first argument to theverify
callback.
So it looks like there should be two signatures for the verify
callback.
Hello, I'm having the same problem, where passReqToCallback
looks set true as default
the problem that I see is that if you fix the problem,a lot of people could be affected.
I did not see this behavior in version 2.1.1 of this library. Until just recently, I was not at all specifying passReqToCallback
in the passport-facebook Strategy call, and my verify function had the signature (accessToken, refreshToken, profile, callback)
. Later, I added passReqToCallback
to the Strategy, and once changing the verify function to have (req, accessToken, refreshToken, profile, callback)
, the arguments were being passed in as expected.
Your docs are wrong, it misinforms.
In your docs
In real life The first is a request. The second is a token. Notice, only one token.. And the third parameter is
undefined