A wrapper for gar_auth and gar_auth_service

gcs_auth(new_user = FALSE, no_auto = FALSE)



If TRUE, reauthenticate via Google login screen


Will ignore auto-authentication settings if TRUE


Invisibly, the token that has been saved to the session


If you have set the environment variable GCS_AUTH_FILE to a valid file location, the function will look there for authentication details. Otherwise it will look in the working directory for the `.httr-oauth` file, which if not present will trigger an authentication flow via Google login screen in your browser.

If GCS_AUTH_FILE is specified, then gcs_auth() will be called upon loading the package via library(googleCloudStorageR), meaning that calling this function yourself at the start of the session won't be necessary. GCS_AUTH_FILE can be either a token generated by gar_auth or service account JSON ending with file extension .json