From 2b2a266533371daaa67b489b91a3f4ecedee4e33 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Wed, 22 Oct 2025 22:39:06 +0800 Subject: [PATCH] set nickname to username if nickname is empty --- pkg/api/oauth2_authentications.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/api/oauth2_authentications.go b/pkg/api/oauth2_authentications.go index d5eef59c..5ade4a73 100644 --- a/pkg/api/oauth2_authentications.go +++ b/pkg/api/oauth2_authentications.go @@ -230,6 +230,10 @@ func (a *OAuth2AuthenticationApi) CallbackHandler(c *core.WebContext) (string, * languageCode := "" currencyCode := "USD" + if nickName == "" { + nickName = userName + } + if _, exists := locales.AllLanguages[oauth2UserInfo.LanguageCode]; exists { languageCode = oauth2UserInfo.LanguageCode }