panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

Passport querystring passthrough #135

Closed major-mann closed 5 years ago

major-mann commented 5 years ago

Added a constructor parameter to the passport strategy which allows querystring values to be passed along with the client authorization redirect.

codecov[bot] commented 5 years ago

Codecov Report

Merging #135 into master will decrease coverage by 0.86%. The diff coverage is 41.66%.

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage     100%   99.13%   -0.87%     
==========================================
  Files          18       18              
  Lines         798      809      +11     
==========================================
+ Hits          798      802       +4     
- Misses          0        7       +7
major-mann commented 5 years ago

Need to revisit the tests

panva commented 5 years ago

didn't you attempt this in #93 already? You can achieve this without any extra code.

major-mann commented 5 years ago

The purpose here is to be able to pass a token as part of a link (Not a static value at configuration time). This allows the login form to be skipped when, for example, sending out a mail campaign.

For example: http://www.example.com/login?auto-login-token=abc123

I realise you can wrap it, it just makes for more declarative code style in routing files

panva commented 5 years ago

See #136.