Skip to content

Commit

Permalink
google: update missing auth help URL
Browse files Browse the repository at this point in the history
Update the URL to a newer page that better describes how to set
up credentials in different environments.

Change-Id: Ic0726fe298c543265d333cda60d62c235e4e2293
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/473735
Reviewed-by: Dmitri Shuralyov <[email protected]>
Run-TryBot: Cody Oss <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Cody Oss <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
codyoss authored and gopherbot committed Mar 17, 2023
1 parent 2fc4ef5 commit 54b70c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions google/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"golang.org/x/oauth2/authhandler"
)

const adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc"

// Credentials holds Google credentials, including "Application Default Credentials".
// For more details, see:
// https://developers.google.com/accounts/docs/application-default-credentials
Expand Down Expand Up @@ -158,8 +160,7 @@ func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsPar
}

// None are found; return helpful error.
const url = "https://developers.google.com/accounts/docs/application-default-credentials"
return nil, fmt.Errorf("google: could not find default credentials. See %v for more information.", url)
return nil, fmt.Errorf("google: could not find default credentials. See %v for more information", adcSetupURL)
}

// FindDefaultCredentials invokes FindDefaultCredentialsWithParams with the specified scopes.
Expand Down

0 comments on commit 54b70c8

Please sign in to comment.