From e0a8f4c6784b16a261a409920878120dccb7fa32 Mon Sep 17 00:00:00 2001 From: David Sharnoff Date: Tue, 27 Sep 2022 18:35:49 -0700 Subject: [PATCH] avoid potential race conditions with lazy-initializers in OpenIDProvider --- pkg/op/op.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/op/op.go b/pkg/op/op.go index 5b8567a..c765a0c 100644 --- a/pkg/op/op.go +++ b/pkg/op/op.go @@ -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 }