Skip to content

Commit 13f4f0b

Browse files
committed
internal/iapclient: remove dead scopes
gomoteConfig.Scopes is not reachable anymore, only the scopes in login are used. To avoid confusion, move those scopes into gomoteConfig and change login to use gomoteConfig.Scopes. Change-Id: I2172983468bb8a565c180994e40580af99f426d7 Reviewed-on: https://go-review.googlesource.com/c/build/+/461960 Run-TryBot: Michael Pratt <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 8fc660d commit 13f4f0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/iapclient/iapclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ var gomoteConfig = &oauth2.Config{
3737
ClientID: "872405196845-odamr0j3kona7rp7fima6h4ummnd078t.apps.googleusercontent.com",
3838
ClientSecret: "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",
3939
Endpoint: google.Endpoint,
40-
Scopes: []string{"openid email"},
40+
Scopes: []string{"email openid profile"},
4141
}
4242

4343
func login(ctx context.Context) (*oauth2.Token, error) {
4444
resp, err := http.PostForm("https://oauth2.googleapis.com/device/code", url.Values{
4545
"client_id": []string{gomoteConfig.ClientID},
46-
"scope": []string{"email openid profile"},
46+
"scope": gomoteConfig.Scopes,
4747
})
4848
if err != nil {
4949
return nil, err

0 commit comments

Comments
 (0)