passport-oauth2 icon indicating copy to clipboard operation
passport-oauth2 copied to clipboard

pass options to authenticate

Open joh-klein opened this issue 8 years ago • 2 comments

For a less than standard OAuth implementation, I needed an additional GET param added to the authorization url. After some pocking around, I found, that simply adding an options object to the passport.authenticate('oauth2', {options}) call, would be enough. But you don't pass them through to the oauth2 module. If I changed this return {}; to return options; it would work. Do you consider this a good idea?

joh-klein avatar Oct 24 '16 13:10 joh-klein

Not quite sure why I won't get an answer here. Should I just open a pull request?

joh-klein avatar May 03 '17 16:05 joh-klein

hi @joh-klein, I think you just need to extend OAuth2Strategy class and override OAuth2Strategy.prototype.authorizationParams

ericschaal avatar Jan 15 '18 17:01 ericschaal