From 83a34ae3224e114945bcb72e27967364bfb8aefa Mon Sep 17 00:00:00 2001 From: MaysWind Date: Fri, 16 Jan 2026 00:00:28 +0800 Subject: [PATCH] allow the either username or email is empty which returns from oauth 2.0 provider, but require both to be present when automatically registering a new user --- pkg/api/oauth2_authentications.go | 29 ++++++++++++++++++++++++----- pkg/errs/oauth2.go | 5 +++++ src/locales/de.json | 5 +++++ src/locales/en.json | 5 +++++ src/locales/es.json | 5 +++++ src/locales/fr.json | 5 +++++ src/locales/it.json | 5 +++++ src/locales/ja.json | 5 +++++ src/locales/kn.json | 5 +++++ src/locales/ko.json | 5 +++++ src/locales/nl.json | 5 +++++ src/locales/pt_BR.json | 5 +++++ src/locales/ru.json | 5 +++++ src/locales/sl.json | 5 +++++ src/locales/th.json | 5 +++++ src/locales/tr.json | 5 +++++ src/locales/uk.json | 5 +++++ src/locales/vi.json | 5 +++++ src/locales/zh_Hans.json | 5 +++++ src/locales/zh_Hant.json | 5 +++++ 20 files changed, 119 insertions(+), 5 deletions(-) diff --git a/pkg/api/oauth2_authentications.go b/pkg/api/oauth2_authentications.go index bea34f29..6525b3b2 100644 --- a/pkg/api/oauth2_authentications.go +++ b/pkg/api/oauth2_authentications.go @@ -208,9 +208,20 @@ func (a *OAuth2AuthenticationApi) CallbackHandler(c *core.WebContext) (string, * return a.redirectToFailedCallbackPage(c, errs.ErrCannotRetrieveUserInfo) } - if oauth2UserInfo.UserName == "" || oauth2UserInfo.Email == "" { - log.Errorf(c, "[oauth2_authentications.CallbackHandler] invalid oauth 2.0 user info, userName: %s, email: %s", oauth2UserInfo.UserName, oauth2UserInfo.Email) - return a.redirectToFailedCallbackPage(c, errs.ErrCannotRetrieveUserInfo) + log.Infof(c, "[oauth2_authentications.CallbackHandler] oauth 2.0 user info, userName: %s, email: %s", oauth2UserInfo.UserName, oauth2UserInfo.Email) + + if oauth2UserInfo.UserName == "" && oauth2UserInfo.Email == "" { + return a.redirectToFailedCallbackPage(c, errs.ErrOAuth2UserNameAndEmailEmpty) + } + + if a.CurrentConfig().OAuth2UserIdentifier == settings.OAuth2UserIdentifierEmail && oauth2UserInfo.Email == "" { + log.Errorf(c, "[oauth2_authentications.CallbackHandler] invalid oauth 2.0 user info, email is empty") + return a.redirectToFailedCallbackPage(c, errs.ErrOAuth2EmailEmpty) + } + + if a.CurrentConfig().OAuth2UserIdentifier == settings.OAuth2UserIdentifierUsername && oauth2UserInfo.UserName == "" { + log.Errorf(c, "[oauth2_authentications.CallbackHandler] invalid oauth 2.0 user info, userName is empty") + return a.redirectToFailedCallbackPage(c, errs.ErrOAuth2UserNameEmpty) } userExternalAuthType := oauth2.GetExternalUserAuthType() @@ -221,7 +232,7 @@ func (a *OAuth2AuthenticationApi) CallbackHandler(c *core.WebContext) (string, * } else if a.CurrentConfig().OAuth2UserIdentifier == settings.OAuth2UserIdentifierUsername { userExternalAuth, err = a.userExternalAuths.GetUserExternalAuthByExternalUserName(c, oauth2UserInfo.UserName, userExternalAuthType) } else { - userExternalAuth, err = a.userExternalAuths.GetUserExternalAuthByExternalEmail(c, oauth2UserInfo.Email, userExternalAuthType) + return a.redirectToFailedCallbackPage(c, errs.ErrNotSupported) } if err != nil && !errors.Is(err, errs.ErrUserExternalAuthNotFound) { @@ -257,7 +268,7 @@ func (a *OAuth2AuthenticationApi) CallbackHandler(c *core.WebContext) (string, * } else if a.CurrentConfig().OAuth2UserIdentifier == settings.OAuth2UserIdentifierUsername { user, err = a.users.GetUserByUsername(c, oauth2UserInfo.UserName) } else { - user, err = a.users.GetUserByEmail(c, oauth2UserInfo.Email) + err = errs.ErrNotSupported } if err != nil && !errors.Is(err, errs.ErrUserNotFound) { @@ -267,6 +278,14 @@ func (a *OAuth2AuthenticationApi) CallbackHandler(c *core.WebContext) (string, * } if user == nil && a.CurrentConfig().EnableUserRegister && a.CurrentConfig().OAuth2AutoRegister { + if oauth2UserInfo.UserName == "" { + return a.redirectToFailedCallbackPage(c, errs.ErrOAuth2UserNameEmptyCannotRegister) + } + + if oauth2UserInfo.Email == "" { + return a.redirectToFailedCallbackPage(c, errs.ErrOAuth2EmailEmptyCannotRegister) + } + userName := strings.TrimSpace(oauth2UserInfo.UserName) email := strings.TrimSpace(oauth2UserInfo.Email) nickName := strings.TrimSpace(oauth2UserInfo.NickName) diff --git a/pkg/errs/oauth2.go b/pkg/errs/oauth2.go index 8f1b274b..eaff05e4 100644 --- a/pkg/errs/oauth2.go +++ b/pkg/errs/oauth2.go @@ -17,4 +17,9 @@ var ( ErrInvalidOAuth2Token = NewNormalError(NormalSubcategoryOAuth2, 8, http.StatusBadRequest, "invalid oauth2 token") ErrCannotRetrieveUserInfo = NewNormalError(NormalSubcategoryOAuth2, 9, http.StatusBadRequest, "cannot retrieve user info from oauth2 provider") ErrOAuth2UserAlreadyBoundToAnotherUser = NewNormalError(NormalSubcategoryOAuth2, 10, http.StatusBadRequest, "oauth2 user already bound to another user") + ErrOAuth2UserNameAndEmailEmpty = NewNormalError(NormalSubcategoryOAuth2, 11, http.StatusBadRequest, "user name and email from oauth2 provider are both empty") + ErrOAuth2UserNameEmpty = NewNormalError(NormalSubcategoryOAuth2, 12, http.StatusBadRequest, "user name from oauth2 provider is empty") + ErrOAuth2EmailEmpty = NewNormalError(NormalSubcategoryOAuth2, 13, http.StatusBadRequest, "email from oauth2 provider is empty") + ErrOAuth2UserNameEmptyCannotRegister = NewNormalError(NormalSubcategoryOAuth2, 14, http.StatusBadRequest, "user name from oauth2 provider is empty, cannot register new user") + ErrOAuth2EmailEmptyCannotRegister = NewNormalError(NormalSubcategoryOAuth2, 15, http.StatusBadRequest, "email from oauth2 provider is empty, cannot register new user") ) diff --git a/src/locales/de.json b/src/locales/de.json index 8bb0aafd..88e5cabe 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/en.json b/src/locales/en.json index 3a5b7845..cd6f47ec 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/es.json b/src/locales/es.json index b2cc6c16..f8b913be 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/fr.json b/src/locales/fr.json index 376a8630..2e9fb7a8 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/it.json b/src/locales/it.json index d1448001..510959ee 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/ja.json b/src/locales/ja.json index d70b23b5..581af74e 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/kn.json b/src/locales/kn.json index 9de95eb5..38ff3e3d 100644 --- a/src/locales/kn.json +++ b/src/locales/kn.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "OAuth 2.0 ಟೋಕನ್ ಅಮಾನ್ಯವಾಗಿದೆ", "cannot retrieve user info from oauth2 provider": "OAuth 2.0 ಪೂರೈಕೆದಾರರಿಂದ ಬಳಕೆದಾರ ಮಾಹಿತಿಯನ್ನು ಪಡೆಯಲು ಸಾಧ್ಯವಿಲ್ಲ", "oauth2 user already bound to another user": "OAuth 2.0 ಬಳಕೆದಾರ ಈಗಾಗಲೇ ಇನ್ನೊಬ್ಬ ಬಳಕೆದಾರನಿಗೆ ಬೌಂಡ್ ಆಗಿದ್ದಾನೆ", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/ko.json b/src/locales/ko.json index bd3a584e..ceb87671 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/nl.json b/src/locales/nl.json index 62dc3ef3..0acf62dc 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/pt_BR.json b/src/locales/pt_BR.json index ec6b662e..6c37394f 100644 --- a/src/locales/pt_BR.json +++ b/src/locales/pt_BR.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/ru.json b/src/locales/ru.json index 58017524..f924f852 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/sl.json b/src/locales/sl.json index 962713fc..88462227 100644 --- a/src/locales/sl.json +++ b/src/locales/sl.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Neveljaven žeton OAuth 2.0", "cannot retrieve user info from oauth2 provider": "Ni mogoče pridobiti podatkov o uporabniku od ponudnika OAuth 2.0", "oauth2 user already bound to another user": "Uporabnik OAuth 2.0 je že povezan z drugim uporabnikom", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/th.json b/src/locales/th.json index 71c2bad1..8deeb770 100644 --- a/src/locales/th.json +++ b/src/locales/th.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/tr.json b/src/locales/tr.json index 51677760..7da3cdc9 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Geçersiz OAuth 2.0 jetonu", "cannot retrieve user info from oauth2 provider": "OAuth 2.0 sağlayıcısından kullanıcı bilgisi alınamıyor", "oauth2 user already bound to another user": "OAuth 2.0 kullanıcısı zaten başka bir kullanıcıya bağlı", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/uk.json b/src/locales/uk.json index 34f6519d..628f1b93 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/vi.json b/src/locales/vi.json index 0bfe74b8..c8bbdb3b 100644 --- a/src/locales/vi.json +++ b/src/locales/vi.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "Invalid OAuth 2.0 token", "cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider", "oauth2 user already bound to another user": "OAuth 2.0 user is already bound to another user", + "user name and email from oauth2 provider are both empty": "User name and email from OAuth 2.0 provider are both empty", + "user name from oauth2 provider is empty": "User name from OAuth 2.0 provider is empty", + "email from oauth2 provider is empty": "Email from OAuth 2.0 provider is empty", + "user name from oauth2 provider is empty, cannot register new user": "User name from OAuth 2.0 provider is empty, cannot register new user", + "email from oauth2 provider is empty, cannot register new user": "Email from OAuth 2.0 provider is empty, cannot register new user", "explorer id is invalid": "Explorer ID is invalid", "explorer not found": "Explorer is not found", "explorer data is invalid": "Explorer data is invalid", diff --git a/src/locales/zh_Hans.json b/src/locales/zh_Hans.json index a320967f..558adf00 100644 --- a/src/locales/zh_Hans.json +++ b/src/locales/zh_Hans.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "无效的 OAuth 2.0 令牌", "cannot retrieve user info from oauth2 provider": "无法从 OAuth 2.0 提供者获取用户信息", "oauth2 user already bound to another user": "OAuth 2.0 用户已经绑定到另一个用户", + "user name and email from oauth2 provider are both empty": "来自 OAuth 2.0 提供者的用户名和电子邮箱均为空", + "user name from oauth2 provider is empty": "来自 OAuth 2.0 提供者的用户名为空", + "email from oauth2 provider is empty": "来自 OAuth 2.0 提供者的电子邮箱为空", + "user name from oauth2 provider is empty, cannot register new user": "来自 OAuth 2.0 提供者的用户名为空,无法注册新用户", + "email from oauth2 provider is empty, cannot register new user": "来自 OAuth 2.0 提供者的电子邮箱为空,无法注册新用户", "explorer id is invalid": "探索ID无效", "explorer not found": "探索不存在", "explorer data is invalid": "探索数据无效", diff --git a/src/locales/zh_Hant.json b/src/locales/zh_Hant.json index ab8bd197..d57da58a 100644 --- a/src/locales/zh_Hant.json +++ b/src/locales/zh_Hant.json @@ -1270,6 +1270,11 @@ "invalid oauth2 token": "無效的 OAuth 2.0 令牌", "cannot retrieve user info from oauth2 provider": "無法從 OAuth 2.0 提供者獲取使用者資訊", "oauth2 user already bound to another user": "OAuth 2.0 使用者已綁定到另一個使用者", + "user name and email from oauth2 provider are both empty": "來自 OAuth 2.0 提供者的使用者名稱和電子郵件均為空", + "user name from oauth2 provider is empty": "來自 OAuth 2.0 提供者的使用者名稱為空", + "email from oauth2 provider is empty": "來自 OAuth 2.0 提供者的電子郵件為空", + "user name from oauth2 provider is empty, cannot register new user": "來自 OAuth 2.0 提供者的使用者名稱為空,無法註冊新使用者", + "email from oauth2 provider is empty, cannot register new user": "來自 OAuth 2.0 提供者的電子郵件為空,無法註冊新使用者", "explorer id is invalid": "探索ID無效", "explorer not found": "探索不存在", "explorer data is invalid": "探索資料無效",