googleCloudStorageR (version 0.3.0)

gcs_auth: Authenticate this session

Description

A wrapper for gar_auth and gar_auth_service

Usage

gcs_auth(new_user = FALSE, no_auto = FALSE)

Arguments

new_user

If TRUE, reauthenticate via Google login screen

no_auto

Will ignore auto-authentication settings if TRUE

Value

Invisibly, the token that has been saved to the session

Details

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