Skip to content

Commit 35e8dd5

Browse files
committedDec 2, 2024
credentials/google/google: Add cloud-platform scope for ADC
Fixes grpc#7886
1 parent 4c07bca commit 35e8dd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎credentials/google/google.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import (
3030
"google.golang.org/grpc/internal"
3131
)
3232

33+
const defaultCloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
34+
3335
var logger = grpclog.Component("credentials")
3436

3537
// DefaultCredentialsOptions constructs options to build DefaultCredentials.
@@ -120,7 +122,7 @@ var (
120122
return alts.NewClientCreds(alts.DefaultClientOptions())
121123
}
122124
newADC = func(ctx context.Context) (credentials.PerRPCCredentials, error) {
123-
return oauth.NewApplicationDefault(ctx)
125+
return oauth.NewApplicationDefault(ctx, defaultCloudPlatformScope)
124126
}
125127
)
126128

0 commit comments

Comments
 (0)