token: an actual token object or the path to a valid token stored as an .rds file
email: An existing gargle cached email to authenticate with or TRUE to authenticate with the only email available.
scopes: Scope of the request
app: app as specified by gar_auth_configure
cache: Where to store authentication tokens
use_oob: Whether to use OOB browserless authentication
package: The name of the package authenticating
Returns
an OAuth token object, specifically a Token2.0, invisibly
Examples
## Not run:# sets GCP project to auth throughgar_auth_configure(path="path/to/gcp-client.json")# starts auth process with defaultsgar_auth()# switching between auth scopes# first time new scope manual auth, then auto if supplied email gar_auth(email ="your@email.com", scopes ="https://www.googleapis.com/auth/drive")# ... query Google Drive functions ...gar_auth(email ="your@email.com", scopes ="https://www.googleapis.com/auth/bigquery")# ..query BigQuery functions ...## End(Not run)
See Also
Other authentication functions: gar_attach_auto_auth(), gar_auth_service(), gar_auto_auth(), gar_gce_auth(), get_google_token(), should_skip_token_checks(), token_exists()