add pre-calls to NewRelyingPartyOIDC too

This commit is contained in:
David Sharnoff 2022-10-03 13:01:06 -07:00
parent 8e6a8fae1f
commit 0bac0de419

View file

@ -190,6 +190,10 @@ func NewRelyingPartyOIDC(issuer, clientID, clientSecret, redirectURI string, sco
rp.oauthConfig.Endpoint = endpoints.Endpoint
rp.endpoints = endpoints
// avoid races by calling these early
_ = rp.IDTokenVerifier() // sets idTokenVerifier
_ = rp.ErrorHandler() // sets errorHandler
return rp, nil
}