feature: add support for scope in request parameter to api.login.yahoo.com/oauth2/request_auth #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per the docs here, I added the option in the
auth()
method to take in a third argument for scope, it works the same way as state, where it's only set if it's present.This option allows the auth method to return a
id_token
which contains a JWT that is digitally signed by Yahoo, in which contains identity information about the user. This information can help create accounts and have data about the user being authetnicated, like their email, first name, etc. This information will be mention on the Yahoo Login when they are redirected to the login page.In addition, I updated the callback method to include the entire response body instead of just the auth token and refresh, since we don't want to limit the response here and just return all the possible properties there are.
If you need anything else in this PR please let me know ! :)