Skip to content

Commit

Permalink
fix: add cloud-platform scope to default token source
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbreuninger committed Dec 14, 2023
1 parent 4c69b84 commit 679c24c
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 679c24c

Please sign in to comment.