avoid potential race conditions with lazy-initializers in OpenIDProvider

This commit is contained in:
David Sharnoff 2022-09-27 18:35:49 -07:00
parent 35630fbb3e
commit e0a8f4c678

View file

@ -166,6 +166,11 @@ func NewOpenIDProvider(ctx context.Context, config *Config, storage Storage, opO
o.crypto = NewAESCrypto(config.CryptoKey)
// Avoid potential race conditions by calling these early
_ = o.AccessTokenVerifier()
_ = o.JWTProfileVerifier()
_ = o.openIDKeySet()
return o, nil
}