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

Propagate token exchange params to load user method #92

Closed glena closed 7 years ago

glena commented 7 years ago

Yahoo oauth2 implementation returns, in a non conformant way, the user_id (xoauth_yahoo_guid) as part of the token exchange response (https://developer.yahoo.com/oauth2/guide/flows_authcode/#step-5-exchange-refresh-token-for-new-access-token).

This is later needed to fetch the user profile.

This prs propagates the params object to the user profile method (only if it expects it, based on its signature)

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 57d371195974bddb7eb3c166c375c6525f4400e6 on glena:send-params-to-loaduser into a9480960be04ac5312f9eae2a6d06d0e8d0e5dda on jaredhanson:master.

glena commented 7 years ago

No need for this, will be resolved in the yahoo strategy