mikenicholson / passport-jwt

Passport authentication using JSON Web Tokens
MIT License
1.96k stars 213 forks source link

Verify callback not passing info parameter to req #146

Closed aaronfulkerson closed 5 years ago

aaronfulkerson commented 6 years ago

As you can see in the following Gist, I'm forced to create a custom callback because the info parameter (line 17 of passport.js) isn't being passed to the next middleware's req variable. Isn't the expected behavior for info to be passed to the next middleware as req.info?

https://gist.github.com/aaronfulkerson/4b87f12eabc453ad1958f01e6c46af61

mikenicholson commented 5 years ago

Are you sure this is an issue with this passport strategy? If you look at https://github.com/themikenicholson/passport-jwt/blob/master/lib/strategy.js#L115 you'll see that info is being passed to the success callback by this strategy.

I don't believe it is the strategies responsibility to set anything on the request object.

mikenicholson commented 5 years ago

Closing due to lack of response.