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

Comments

Projects
None yet
3 participants
@ctrombley
Contributor

ctrombley commented Oct 27, 2017

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

ctrombley commented Oct 28, 2017

@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

This comment has been minimized.

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

This comment has been minimized.

Member

hadley commented Nov 22, 2018

(And also needs an update of the demo)

@ctrombley

This comment has been minimized.

Contributor

ctrombley commented Nov 23, 2018

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

ctrombley pushed a commit to ctrombley/httr that referenced this issue Nov 27, 2018

ctrombley pushed a commit to ctrombley/httr that referenced this issue Nov 27, 2018

ctrombley pushed a commit to ctrombley/httr that referenced this issue Nov 27, 2018

ctrombley pushed a commit to ctrombley/httr that referenced this issue Nov 28, 2018

ctrombley pushed a commit to ctrombley/httr that referenced this issue Nov 28, 2018

@hadley hadley closed this in 66a48cb Nov 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment