cloudyr / googleCloudStorageR

Google Cloud Storage API to R

Home Page:https://code.markedmondson.me/googleCloudStorageR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gargle 1.2.1 breaks token authentication example

oobd opened this issue · comments

commented

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!