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

support for OAuth2 in Yahoo API #493

Closed
ctrombley opened this issue Oct 27, 2017 · 5 comments
Closed

support for OAuth2 in Yahoo API #493

ctrombley opened this issue Oct 27, 2017 · 5 comments
Labels
feature a feature request or enhancement oauth 🏓

Comments

@ctrombley
Copy link
Contributor

I was recently able to complete a successful auth flow against Yahoo's OAuth2 API with httr, but only after a few small changes:

  1. The OOB flow expects a request_uri value of oob rather than urn:ietf:wg:oauth:2.0:oob.
  2. The base url for Yahoo's OAuth2 endpoints had to be changed from https://api.login.yahoo.com/oauth/v2 to https://api.login.yahoo.com/oauth2.

Is there any desire to add either of these changes into the package? I can take a stab at a PR if so. For the first issue, it would be simple to add an override for the OOB string, with the option scoped either globally or to the app. For the second, the existing endpoint could be updated or separate endpoints could be provided for OAuth1 and OAuth2.

Thoughts?

@Tectra
Copy link

Tectra commented Oct 28, 2017

@ctrombley would you be willing to sure your code? been struggling with getting oauth2 working.

ctrombley added a commit to ctrombley/httr that referenced this issue Oct 28, 2017
@ctrombley
Copy link
Contributor Author

@Tectra sure thing. Keep in mind I am running an OOB OAuth flow, so I have provisioned a Desktop application in Yahoo. Here's a gist:

https://gist.github.com/ctrombley/296c2d9eb2738642b953debfc7404b12

It requires my httr fork available here:
https://github.com/ctrombley/httr

Also worth noting that I am creating my own oauth_app rather than using oauth_endpoints("yahoo"). Here's the commit in my fork that allows overriding the redirect_url at the app level:
ctrombley@86b409d

@hadley hadley added feature a feature request or enhancement oauth 🏓 labels Nov 22, 2018
@hadley
Copy link
Member

hadley commented Nov 22, 2018

@ctrombley are you still interested in doing a PR? I'm happy to implement myself, but if you'd like to take a shot I'd be happy to review your code. Please let me know either way.

If so, the main challenge is figuring out how to specify the oob value. For now, since we'll reconsider this entire API in httr2, I'd recommend adding a new parameter, oob_value

@hadley
Copy link
Member

hadley commented Nov 22, 2018

(And also needs an update of the demo)

@ctrombley
Copy link
Contributor Author

@hadley sure! I'm throwing something together now.

ctrombley added a commit to ctrombley/httr that referenced this issue Nov 27, 2018
ctrombley added a commit to ctrombley/httr that referenced this issue Nov 27, 2018
ctrombley added a commit to ctrombley/httr that referenced this issue Nov 28, 2018
ctrombley added a commit to ctrombley/httr that referenced this issue Nov 28, 2018
@hadley hadley closed this as completed in 66a48cb Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement oauth 🏓
Projects
None yet
Development

No branches or pull requests

3 participants