From f9ed6f34b2791d5d031137bd9fddf637c9c35b80 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 17 Feb 2024 13:07:52 +0800 Subject: [PATCH] optmize --- modules/setting/oauth2.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/setting/oauth2.go b/modules/setting/oauth2.go index af74766362719..5b7579a8c9af3 100644 --- a/modules/setting/oauth2.go +++ b/modules/setting/oauth2.go @@ -168,6 +168,7 @@ func GetGeneralTokenSigningSecret() []byte { if generalSigningSecret.CompareAndSwap(old, &jwtSecret) { log.Warn("OAuth2 is not enabled, unable to use a persistent signing secret, a new one is generated, which is not persistent between restarts and cluster nodes") } + return jwtSecret } - return *generalSigningSecret.Load() + return *old }