Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Add support for implicit OAuth 2.0 signin #745

Open
harrisj opened this issue Jul 31, 2015 · 0 comments
Open

Add support for implicit OAuth 2.0 signin #745

harrisj opened this issue Jul 31, 2015 · 0 comments
Assignees

Comments

@harrisj
Copy link
Contributor

harrisj commented Jul 31, 2015

@vzvenyach has requested script access for logging into MyUSA so he can pull data from an authenticated backend. This isn't really feasible to do for the standard Authorization Code Grant Flow, since that requires a browser and an application running on a web server. But there is an alternate Implicit flow that would enable him to log in via OAuth. Here is an example of that code in the OAuth2 gem

auth_url = client.implicit.authorize_url(:redirect_uri => 'http://localhost:8080/oauth/callback')
# get the token params in the callback and
token = OAuth2::AccessToken.from_kvform(client, query_string)

It sends a URL, but the access token is included in the auth_url response and there is no need to visit the URL to get the access token. Instead, it can be pulled directly from the auth_url query string.

This will require only a slight tweak to doorkeeper.rb to enable. Are there any problems if we make this change at this point. There are less elegant alternatives should it be necessary, but I think this change is easy enough if it's okay.

@harrisj harrisj self-assigned this Jul 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant