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

HTTR v0.4 Unable to Run Google Auth Example #126

Closed
WillemPaling opened this Issue Aug 3, 2014 · 7 comments

Comments

Projects
None yet
3 participants
@WillemPaling
Contributor

WillemPaling commented Aug 3, 2014

When I try to run the Google auth example, I get:

Error in authorizer(authorize_url, is_interactive) : unused argument (is_interactive)

This is not happening for me with HTTR 0.3 (R version 3.1.1) on OSX Mavericks.
But is happening with HTTR 0.4 on Ubuntu Trusty.

Traceback below:

6: authorizer(authorize_url, is_interactive)
5: init_oauth2.0(endpoint, app, scope = params$scope, type = params$type, 
       use_oob = params$use_oob)
4: .self$init_credentials()
3: token(app = app, endpoint = endpoint, params = params, cache_path = cache_path)$init()
2: new_token(Token2.0, endpoint, app, params, cache = cache)
1: oauth2.0_token(oauth_endpoints("google"), myapp, scope = "https://www.googleapis.com/auth/userinfo.profile")
@hadley

This comment has been minimized.

Member

hadley commented Aug 3, 2014

Which google auth example?

@WillemPaling

This comment has been minimized.

Contributor

WillemPaling commented Aug 4, 2014

I was using the Google demo example in this repository:
https://github.com/hadley/httr/blob/master/demo/oauth2-google.r

I had the problem with an API wrapper library that I'm building for the DoubleClick API, but verified that I was having the same problem with the OAUTH demo code above.

@1beb

This comment has been minimized.

Contributor

1beb commented Sep 2, 2014

+1 same issue. Here's the code I use to connect: https://github.com/1beb/RGoogleDrive/blob/master/R/drive.auth.r

@hadley

This comment has been minimized.

Member

hadley commented Oct 6, 2014

Now works for me, so I've probably fixed the bug in the interim.

@hadley hadley closed this Oct 6, 2014

@WillemPaling

This comment has been minimized.

Contributor

WillemPaling commented Oct 7, 2014

Unfortunately I'm still getting the same error.

google_token <- oauth2.0_token(oauth_endpoints("google"), myapp,
+ scope = "https://www.googleapis.com/auth/userinfo.profile")
Error in authorizer(authorize_url, is_interactive) : 
  unused argument (is_interactive)
@WillemPaling

This comment has been minimized.

Contributor

WillemPaling commented Oct 7, 2014

I've done some testing, and can see that this is only a problem when setting the following flag so that oauth_exchanger is mapped to authorizer (where is_interactive is not a param).

options(httr_oob_default = TRUE)

@WillemPaling

This comment has been minimized.

Contributor

WillemPaling commented Oct 7, 2014

I've confirmed that was the problem and have submitted a PR:
https://github.com/hadley/httr/pull/157/files

WillemPaling added a commit to WillemPaling/httr that referenced this issue Oct 8, 2014

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