Skip to content

Commit

Permalink
review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Trojan295 committed Sep 24, 2024
1 parent 40912fd commit 94f31c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/cloud/gcp/gcpauth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (

"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"google.golang.org/api/serviceusage/v1"
)

func NewTokenSource(ctx context.Context, scopes ...string) (oauth2.TokenSource, error) {
if len(scopes) == 0 {
scopes = []string{"https://www.googleapis.com/auth/cloud-platform"}
scopes = []string{serviceusage.CloudPlatformScope}
}

return google.DefaultTokenSource(ctx, scopes...)
Expand Down

0 comments on commit 94f31c7

Please sign in to comment.