pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
154 stars 24 forks source link

Can't authenticate using v2 branch? #22

Closed cboettig closed 10 years ago

cboettig commented 10 years ago

Hi @sckott

I just installed v2 branch and try do_auth(), paste in my token. I try droplets() and now I get the following error and trace:

droplets()
Error: !is.null(appname) is not TRUE

Enter a frame number, or 0 to exit   

1: droplets()
2: do_GET(what, path, query = ct(page = page, per_page = per_page), parse = FALSE, config = config)
3: do_oauth()
4: assert_that(!is.null(appname), !is.null(client_id), !is.null(client_secret))

Something change recently? Thought this was working for me before...

Here's sessionInfo()

R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] analogsea_0.1.8.99 magrittr_1.0.1    

loaded via a namespace (and not attached):
 [1] RCurl_1.95-4.3      Rcpp_0.11.2         XML_3.98-1.1       
 [4] assertthat_0.1      brew_1.0-6          devtools_1.5.0.9000
 [7] digest_0.6.4        evaluate_0.5.5      httr_0.4           
[10] jsonlite_0.9.10     memoise_0.2.1       parallel_3.1.1     
[13] plyr_1.8.1          roxygen2_4.0.1      stringr_0.6.2      
[16] tools_3.1.1         whisker_0.3-2      
sckott commented 10 years ago

hey @cboettig Sorry, I changed to using an oauth web flow, just like one would do with github/etc. using httr.

instructions https://github.com/sckott/analogsea/tree/v2#authenticate

So create an app on your DO account, store your app name, client id, and secret in .Rprofile, or pass in as arguments to do_oauth()

does that work?

cboettig commented 10 years ago

When it takes me to the browser to confirm, instead I get an error message about invalid redirect URL...

(With the oauth app model, you should be able to ship the client key and secret with the package? Then a user could just authenticate with their account and not have to worry about tokens, right?)


Carl Boettiger http://carlboettiger.info

sent from mobile device; my apologies for any terseness or typos On Aug 31, 2014 12:18 AM, "Scott Chamberlain" notifications@github.com wrote:

hey @cboettig https://github.com/cboettig Sorry, I changed to using an oauth web flow, just like one would do with github/etc. using httr.

instructions https://github.com/sckott/analogsea/tree/v2#authenticate

So create an app on your DO account, store your app name, client id, and secret in .Rprofile, or pass in as arguments to do_oauth()

does that work?

— Reply to this email directly or view it on GitHub https://github.com/sckott/analogsea/issues/22#issuecomment-53980154.

sckott commented 10 years ago

Okay, try do_oauth() again, included the app details in the auth function.

sckott commented 10 years ago

@cboettig a key thing missing is that using an ssh key via the new v2 API is not working right now #23 - trying to get it fixed - without this we can't ssh into the machine without a password...

cboettig commented 10 years ago

Thanks! that works perfectly.

On Sun, Aug 31, 2014 at 10:51 AM, Scott Chamberlain < notifications@github.com> wrote:

@cboettig https://github.com/cboettig a key thing missing is that using an ssh key via the new v2 API is not working right now #23 https://github.com/sckott/analogsea/issues/23 - trying to get it fixed

  • without this we can't ssh into the machine without a password...

— Reply to this email directly or view it on GitHub https://github.com/sckott/analogsea/issues/22#issuecomment-53995565.

Carl Boettiger UC Santa Cruz http://carlboettiger.info/

sckott commented 10 years ago

cool!