From b35900aff148bb8446ca7e15ed0beb50d749d6c7 Mon Sep 17 00:00:00 2001 From: Adriana <43220284+adrianajg@users.noreply.github.com> Date: Tue, 3 Jan 2023 13:04:38 -0500 Subject: [PATCH] fix(idtoken): configure validator constructor to use no authentication (#1789) Fixes: #1682 --- idtoken/validate.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/idtoken/validate.go b/idtoken/validate.go index e2b84f0b67a..5f89b9b630e 100644 --- a/idtoken/validate.go +++ b/idtoken/validate.go @@ -19,6 +19,7 @@ import ( "strings" "time" + "google.golang.org/api/option" "google.golang.org/api/option/internaloption" htransport "google.golang.org/api/transport/http" ) @@ -36,7 +37,10 @@ var ( ) func defaultValidatorOpts() []ClientOption { - return []ClientOption{internaloption.WithDefaultScopes("https://www.googleapis.com/auth/cloud-platform")} + return []ClientOption{ + internaloption.WithDefaultScopes("https://www.googleapis.com/auth/cloud-platform"), + option.WithoutAuthentication(), + } } // Payload represents a decoded payload of an ID Token.