Skip to content

Commit

Permalink
Merge pull request #11 from loft-sh/fix/token-credentials-2
Browse files Browse the repository at this point in the history
fix: add cloud-platform scope to default token source
  • Loading branch information
pascalbreuninger authored Dec 14, 2023
2 parents 4c69b84 + 679c24c commit eb20fd6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/gcloud/gcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ func SetupEnvJson(ctx context.Context) error {
}

func DefaultTokenSource(ctx context.Context) (oauth2.TokenSource, error) {
return google.DefaultTokenSource(ctx)
scopes := []string{
"https://www.googleapis.com/auth/cloud-platform",
}

return google.DefaultTokenSource(ctx, scopes...)
}

func ParseToken(tok string) (*oauth2.Token, error) {
Expand Down

0 comments on commit eb20fd6

Please sign in to comment.