Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the approval_prompt parameter used in the Google OAUTH2 API #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sema
Copy link

@sema sema commented Jan 23, 2014

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 to force (default) or auto. 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.

sema added 2 commits January 18, 2014 12:45
This parameter mimics the functionality of the approval_prompt parameter as defined in the Google OAUTH2 API documentation[1].

[1] https://developers.google.com/accounts/docs/OAuth2WebServer#formingtheurl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant