Add support for the approval_prompt parameter used in the Google OAUTH2 API #65
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.
This adds support foro the
approval_prompt
parameter supported in the Google OAUTH2 API.See https://developers.google.com/accounts/docs/OAuth2WebServer#formingtheurl
In short, this parameter is now supported in authorization requests (4.1.1). The
approval_prompt
can be set toforce
(default) orauto
. If auto is used, then it will automatically bypass the approval prompt if the client already has a valid authorization code for the current user and scope. Redirecting to the client immediately with a grant without interaction from the user.Essentially, this enables the OAUTH API to be used as an authentication service, such that the user can log in using the OAUTH API without re-granting the same access rights each and every time.
By default, this this feature is disabled. Enable it by setting OAUTH_ENABLE_APPROVAL_PROMPT_BYPASS = true in the settings. This change is backwards compatible with the existing API and behaviour.
Tests and documentation included in the pull request.