Skip to content

Commit 61bd79c

Browse files
committed
Add default scope to default credentials.
Replaces r-lib#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")) <Token> ```
1 parent 46a7ae6 commit 61bd79c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/credentials_app_default.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
#' \dontrun{
4646
#' credentials_app_default()
4747
#' }
48-
credentials_app_default <- function(scopes = NULL, ..., subject = NULL) {
48+
credentials_app_default <- function(scopes =
49+
c("https://www.googleapis.com/auth/cloud-platform"), ..., subject = NULL) {
4950
gargle_debug("trying {.fun credentials_app_default}")
5051
# In general, application default credentials only include the cloud-platform
5152
# scope.

0 commit comments

Comments
 (0)