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

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

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

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

WillemPaling opened this issue Aug 3, 2014 · 7 comments

Comments

@WillemPaling
Copy link
Contributor

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
Copy link
Member

hadley commented Aug 3, 2014

Which google auth example?

@WillemPaling
Copy link
Contributor Author

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
Copy link
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
Copy link
Member

hadley commented Oct 6, 2014

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

@hadley hadley closed this as completed Oct 6, 2014
@WillemPaling
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants