Skip to content

Commit b35900a

Browse files
authored
fix(idtoken): configure validator constructor to use no authentication (#1789)
Fixes: #1682
1 parent ca86833 commit b35900a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

idtoken/validate.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"strings"
2020
"time"
2121

22+
"google.golang.org/api/option"
2223
"google.golang.org/api/option/internaloption"
2324
htransport "google.golang.org/api/transport/http"
2425
)
@@ -36,7 +37,10 @@ var (
3637
)
3738

3839
func defaultValidatorOpts() []ClientOption {
39-
return []ClientOption{internaloption.WithDefaultScopes("https://www.googleapis.com/auth/cloud-platform")}
40+
return []ClientOption{
41+
internaloption.WithDefaultScopes("https://www.googleapis.com/auth/cloud-platform"),
42+
option.WithoutAuthentication(),
43+
}
4044
}
4145

4246
// Payload represents a decoded payload of an ID Token.

0 commit comments

Comments
 (0)