File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ import (
28
28
apiopt "google.golang.org/api/option"
29
29
)
30
30
31
+ const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
32
+
31
33
// An Option is an option for configuring a Dialer.
32
34
type Option func (d * dialerConfig )
33
35
@@ -71,7 +73,8 @@ func WithCredentialsFile(filename string) Option {
71
73
// or refresh token JSON credentials to be used as the basis for authentication.
72
74
func WithCredentialsJSON (b []byte ) Option {
73
75
return func (d * dialerConfig ) {
74
- c , err := google .CredentialsFromJSON (context .Background (), b ) // TODO: add AlloyDB scope
76
+ // TODO: Use AlloyDB-specfic scope
77
+ c , err := google .CredentialsFromJSON (context .Background (), b , CloudPlatformScope )
75
78
if err != nil {
76
79
d .err = errtype .NewConfigError (err .Error (), "n/a" )
77
80
return
You can’t perform that action at this time.
0 commit comments