From 61bd79c41a4ab304077809989e172c3011c671e3 Mon Sep 17 00:00:00 2001 From: Ali Ebrahim Date: Fri, 28 Apr 2023 16:06:03 -0700 Subject: [PATCH] Add default scope to default credentials. Replaces #229. This fixes a bug where if no scopes are passed in, application default credentials fail in the authorized_user flow. ``` >>> credentials_app_default() NULL >>> credentials_app_default(scopes=c("https://www.googleapis.com/auth/cloud-platform")) ``` --- R/credentials_app_default.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/credentials_app_default.R b/R/credentials_app_default.R index 978407f6..cd73712f 100644 --- a/R/credentials_app_default.R +++ b/R/credentials_app_default.R @@ -45,7 +45,8 @@ #' \dontrun{ #' credentials_app_default() #' } -credentials_app_default <- function(scopes = NULL, ..., subject = NULL) { +credentials_app_default <- function(scopes = + c("https://www.googleapis.com/auth/cloud-platform"), ..., subject = NULL) { gargle_debug("trying {.fun credentials_app_default}") # In general, application default credentials only include the cloud-platform # scope.