review feedback -- additional potential races

This commit is contained in:
David Sharnoff 2022-09-30 08:48:38 -07:00
parent 2067a740cc
commit 8e6a8fae1f
2 changed files with 7 additions and 4 deletions

View file

@ -154,7 +154,9 @@ func NewRelyingPartyOAuth(config *oauth2.Config, options ...Option) (RelyingPart
}
}
_ = rp.IDTokenVerifier()
// avoid races by calling these early
_ = rp.IDTokenVerifier() // sets idTokenVerifier
_ = rp.ErrorHandler() // sets errorHandler
return rp, nil
}