avoid potential race conditions with lazy-initializers in OpenIDProvider
This commit is contained in:
parent
35630fbb3e
commit
e0a8f4c678
1 changed files with 5 additions and 0 deletions
|
@ -166,6 +166,11 @@ func NewOpenIDProvider(ctx context.Context, config *Config, storage Storage, opO
|
||||||
|
|
||||||
o.crypto = NewAESCrypto(config.CryptoKey)
|
o.crypto = NewAESCrypto(config.CryptoKey)
|
||||||
|
|
||||||
|
// Avoid potential race conditions by calling these early
|
||||||
|
_ = o.AccessTokenVerifier()
|
||||||
|
_ = o.JWTProfileVerifier()
|
||||||
|
_ = o.openIDKeySet()
|
||||||
|
|
||||||
return o, nil
|
return o, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue