jaredhanson / passport-oauth2

OAuth 2.0 authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-oauth2/?utm_source=github&utm_medium=referral&utm_campaign=passport-oauth2&utm_content=about
MIT License
607 stars 343 forks source link

Automatic state support #138

Closed jaredhanson closed 3 years ago

jaredhanson commented 3 years ago

The pull request implements enhanced support for state, such that:

  1. state can be passed as an option to passport.authenticate()
  2. That state will be automatically serialized to the session by OAuth2Strategy
  3. On the callback back to the app, the state passed in 1. will be set at req.authInfo.state.
jaredhanson commented 3 years ago

I've merged this pull request, and released passport-oauth2@1.6.0. More information on the improved state support and how to take advantage it are provided on the blog: Application State in OAuth 2.0