googledrive icon indicating copy to clipboard operation
googledrive copied to clipboard

having problem "drive_auth" on linux

Open Jin-pyo opened this issue 2 years ago • 3 comments

I tried to call the "drive_auth" function on Window which is my local computer. It was a success. the problem is that after I upload it on the Linux server.

I expected the login page should be open but it doesn't

I'm using google drive version 0.1.3 and R version 3.5.3 I know I've been using a quite low google drive version but I have no choice.

There is my error message

waiting for authentication in the browser.... Press Esc/Ctrl + C to abort Couldn't get a file descriptor referring to the console

There is my R code google_app <- httr::oauth_app(appNm, key = key, secret = secret) <-- It is for google API's key and secret value drive_auth_config(app = google_app) drive_auth(cache = TRUE, use_oob = FALSE) <-- this is the point I have error

Jin-pyo avatar Jan 19 '22 08:01 Jin-pyo

I have a little trouble following.

I tried to call the "drive_auth" function on Window which is my local computer. It was a success.the problem is that after I upload it on the Linux server.

My understanding: you've done auth locally and have saved a token (?). You then deploy this project to a linux server, where you want this pre-existing token to be used.

I expected the login page should be open but it doesn't

Now it sounds like you expect to walk through interactive auth on the linux server as well. Why? Don't you want to use the locally obtained token?

I think this is the first thing to sort out:

Are you trying to run something non-interactively on this linux server? Using a pre-obtained token? Or do you want to actually walk through the auth flow on the linux server?

jennybc avatar Jan 19 '22 18:01 jennybc

Hello Jenny

I'll explain what I wanna do using drive_auth

I'd like to build a service that people can access their own google drive to get the file list they uploaded on google drive. From what I know, each one has to get each token to access google drive through login. so I'd like to make my client walk through the auth flow on the Linux server.

here is the process that I wanna do

  1. click the connection button on my website
  2. google login page appears then, I log in
  3. get the file lists and show them on my website
  4. If I click one of the file lists, bring the file's content and show it on my website.

On Windows, everything is good. but when I run this code on Linux, the google login page doesn't appear. that's what I have a problem with.

Jin-pyo avatar Jan 20 '22 00:01 Jin-pyo

gargle, which googledrive uses under the hood, isn't currently setup for easy use in this context, for example, to let individual users of a Shiny app auth as themselves (I'm not sure if that's how you're making this website?).

There are somewhat awkward ways to do this, but it's not officially supported. It's on the todo list.

jennybc avatar Jan 20 '22 02:01 jennybc