openforis / sepal

Geographical Data Processing in the Cloud
https://sepal.io/
MIT License
203 stars 45 forks source link

Authentication to Google Drive not working #293

Open gaelso opened 11 months ago

gaelso commented 11 months ago

Describe the bug Authentication fails with 2 methods:

Error 400: invalid_request The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method. Request details: redirect_uri=urn:ietf:wg:oauth:2.0:oob

Potential app out-of-date issue: https://github.com/odeke-em/drive/issues/1146

Error 400: redirect_uri_mismatch The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at https://console.developers.google.com/apis/credentials/oauthclient

using googledrive::drive_auth(use_oob = TRUE) as suggested here for R in a web browser also doesn't work: https://googledrive.tidyverse.org/reference/drive_auth.html

To Reproduce Steps to reproduce the behavior:

  1. Launch and instance and in terminal type: drive init

  2. Copy/paste the url to a new tab

  3. Launch Rstudio and in the console type: googledrive::drive_auth()

Expected behavior in both case the code /url should open a new page asking for credentials to user's google drive account and unlock functions to upload and download data

Screenshots If applicable, add screenshots to help explain your problem.