mikenicholson / passport-jwt

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

Adding callbacks to options param. #237

Open arpontes opened 1 year ago

arpontes commented 1 year ago

The 'options' param has callback functions to substitute calls for injected methods. This will allow a single instance of this strategy to be used by multiple requests.

Outternet commented 1 year ago

Please elaborate why that is, because in its current state it can be used for multiple requests (that is the purpose of passport). Do you mean multiple strategies because then it is perfectly reconstructable or multiple guards but that is also possible.