cloudyr / googleCloudStorageR

Google Cloud Storage API to R
https://code.markedmondson.me/googleCloudStorageR
Other
104 stars 29 forks source link

gargle 1.2.1 breaks token authentication example #167

Open oobd opened 1 year ago

oobd commented 1 year ago

updating to gargle 1.2.1 seems to break the authentication method examples given at: https://code.markedmondson.me/googleCloudStorageR/articles/googleCloudStorageR.html

library(googleCloudStorageR)
library(gargle)

## Fetch token. See: https://developers.google.com/identity/protocols/oauth2/scopes
scope <-c("https://www.googleapis.com/auth/cloud-platform")
token <- token_fetch(scopes = scope)

## Pass your token to gcs_auth
gcs_auth(token = token)

## Perform gcs operations as normal
gcs_list_objects(bucket = "my-bucket")

Looking at gargle 1.2.1 release notes, it looks like they stopped supporting googleapis.com/ methods? Release notes: "We have switched to newer oauth2.googleapis.com-based OAuth2 URIs, moving away from the accounts.google.com and googleapis.com/oauth2 equivalents."

This has been the easiest method to authenticate for gcs access (much simpler than methods using json files). Is there a way to still use this method?

Thanks!