mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
fix error message is not localized text on the OAuth 2.0 callback page
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
const oauth2CallbackPageUrlSuccessFormat = "%sdesktop/#/oauth2_callback?platform=%s&provider=%s&token=%s"
|
||||
const oauth2CallbackPageUrlNeedVerifyFormat = "%sdesktop/#/oauth2_callback?platform=%s&provider=%s&userName=%s&token=%s"
|
||||
const oauth2CallbackPageUrlFailedFormat = "%sdesktop/#/oauth2_callback?error=%s"
|
||||
const oauth2CallbackPageUrlFailedFormat = "%sdesktop/#/oauth2_callback?errorCode=%d&errorMessage=%s"
|
||||
|
||||
// OAuth2AuthenticationApi represents OAuth 2.0 authorization api
|
||||
type OAuth2AuthenticationApi struct {
|
||||
@@ -309,5 +309,5 @@ func (a *OAuth2AuthenticationApi) redirectToVerifyCallbackPage(c *core.WebContex
|
||||
}
|
||||
|
||||
func (a *OAuth2AuthenticationApi) redirectToFailedCallbackPage(c *core.WebContext, err *errs.Error) (string, *errs.Error) {
|
||||
return fmt.Sprintf(oauth2CallbackPageUrlFailedFormat, a.CurrentConfig().RootUrl, url.QueryEscape(utils.GetDisplayErrorMessage(err))), nil
|
||||
return fmt.Sprintf(oauth2CallbackPageUrlFailedFormat, a.CurrentConfig().RootUrl, err.Code(), url.QueryEscape(utils.GetDisplayErrorMessage(err))), nil
|
||||
}
|
||||
|
||||
+10
-10
@@ -6,14 +6,14 @@ import (
|
||||
|
||||
// Error codes related to oauth 2.0
|
||||
var (
|
||||
ErrOAuth2NotEnabled = NewNormalError(NormalSubcategoryOAuth2, 0, http.StatusUnauthorized, "oauth 2.0 not enabled")
|
||||
ErrOAuth2AutoRegistrationNotEnabled = NewNormalError(NormalSubcategoryOAuth2, 1, http.StatusUnauthorized, "oauth 2.0 auto registration not enabled")
|
||||
ErrInvalidOAuth2LoginRequest = NewNormalError(NormalSubcategoryOAuth2, 2, http.StatusUnauthorized, "invalid oauth 2.0 login request")
|
||||
ErrInvalidOAuth2Callback = NewNormalError(NormalSubcategoryOAuth2, 3, http.StatusUnauthorized, "invalid oauth 2.0 callback")
|
||||
ErrMissingOAuth2State = NewNormalError(NormalSubcategoryOAuth2, 4, http.StatusUnauthorized, "missing state in oauth 2.0 callback")
|
||||
ErrMissingOAuth2Code = NewNormalError(NormalSubcategoryOAuth2, 5, http.StatusUnauthorized, "missing code in oauth 2.0 callback")
|
||||
ErrInvalidOAuth2State = NewNormalError(NormalSubcategoryOAuth2, 6, http.StatusUnauthorized, "invalid state in oauth 2.0 callback")
|
||||
ErrCannotRetrieveOAuth2Token = NewNormalError(NormalSubcategoryOAuth2, 7, http.StatusUnauthorized, "cannot retrieve oauth 2.0 token")
|
||||
ErrInvalidOAuth2Token = NewNormalError(NormalSubcategoryOAuth2, 8, http.StatusUnauthorized, "invalid oauth 2.0 token")
|
||||
ErrCannotRetrieveUserInfo = NewNormalError(NormalSubcategoryOAuth2, 9, http.StatusUnauthorized, "cannot retrieve user info from oauth 2.0 provider")
|
||||
ErrOAuth2NotEnabled = NewNormalError(NormalSubcategoryOAuth2, 0, http.StatusUnauthorized, "oauth2 not enabled")
|
||||
ErrOAuth2AutoRegistrationNotEnabled = NewNormalError(NormalSubcategoryOAuth2, 1, http.StatusUnauthorized, "oauth2 auto registration not enabled")
|
||||
ErrInvalidOAuth2LoginRequest = NewNormalError(NormalSubcategoryOAuth2, 2, http.StatusUnauthorized, "invalid oauth2 login request")
|
||||
ErrInvalidOAuth2Callback = NewNormalError(NormalSubcategoryOAuth2, 3, http.StatusUnauthorized, "invalid oauth2 callback")
|
||||
ErrMissingOAuth2State = NewNormalError(NormalSubcategoryOAuth2, 4, http.StatusUnauthorized, "missing state in oauth2 callback")
|
||||
ErrMissingOAuth2Code = NewNormalError(NormalSubcategoryOAuth2, 5, http.StatusUnauthorized, "missing code in oauth2 callback")
|
||||
ErrInvalidOAuth2State = NewNormalError(NormalSubcategoryOAuth2, 6, http.StatusUnauthorized, "invalid state in oauth2 callback")
|
||||
ErrCannotRetrieveOAuth2Token = NewNormalError(NormalSubcategoryOAuth2, 7, http.StatusUnauthorized, "cannot retrieve oauth2 token")
|
||||
ErrInvalidOAuth2Token = NewNormalError(NormalSubcategoryOAuth2, 8, http.StatusUnauthorized, "invalid oauth2 token")
|
||||
ErrCannotRetrieveUserInfo = NewNormalError(NormalSubcategoryOAuth2, 9, http.StatusUnauthorized, "cannot retrieve user info from oauth2 provider")
|
||||
)
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Abfrageelemente dürfen nicht leer sein",
|
||||
"query items too much": "Zu viele Abfrageelemente",
|
||||
"query items have invalid item": "Ungültiges Element in Abfrageelementen",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "There are no query items",
|
||||
"query items too much": "There are too many query items",
|
||||
"query items have invalid item": "There is invalid item in query items",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "--",
|
||||
"query items too much": "--",
|
||||
"query items have invalid item": "Hay un elemento no válido en los elementos de consulta",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "L'image téléchargée pour la reconnaissance IA dépasse la taille de fichier maximale autorisée",
|
||||
"no transaction information detected": "Aucune information de transaction détectée",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Il n'y a pas d'éléments de requête",
|
||||
"query items too much": "Il y a trop d'éléments de requête",
|
||||
"query items have invalid item": "Il y a un élément invalide dans les éléments de requête",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Non ci sono elementi di query",
|
||||
"query items too much": "Ci sono troppi elementi di query",
|
||||
"query items have invalid item": "C'è un elemento non valido negli elementi di query",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "クエリ項目がありません",
|
||||
"query items too much": "クエリ項目が多すぎます",
|
||||
"query items have invalid item": "クエリ項目に無効な項目があります",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "AI 인식을 위한 업로드된 이미지가 허용된 최대 파일 크기를 초과합니다.",
|
||||
"no transaction information detected": "거래 정보가 감지되지 않았습니다.",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "쿼리 항목이 비어 있을 수 없습니다.",
|
||||
"query items too much": "쿼리 항목이 너무 많습니다.",
|
||||
"query items have invalid item": "쿼리 항목에 유효하지 않은 항목이 있습니다.",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Geen zoekitems opgegeven",
|
||||
"query items too much": "Te veel zoekitems",
|
||||
"query items have invalid item": "Ongeldig item in zoekitems",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Não há itens de consulta",
|
||||
"query items too much": "Há muitos itens de consulta",
|
||||
"query items have invalid item": "Há item inválido nos itens de consulta",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Нет элементов запроса",
|
||||
"query items too much": "Слишком много элементов запроса",
|
||||
"query items have invalid item": "В элементах запроса присутствует недопустимый элемент",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "ไฟล์รูปภาพสำหรับการจดจำด้วย AI เกินขนาดสูงสุดที่อนุญาต",
|
||||
"no transaction information detected": "ไม่พบข้อมูลธุรกรรม",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "ไม่มีรายการสำหรับค้นหา",
|
||||
"query items too much": "รายการค้นหามากเกินไป",
|
||||
"query items have invalid item": "มีรายการไม่ถูกต้องในรายการค้นหา",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Елементи запиту не можуть бути порожніми",
|
||||
"query items too much": "Занадто багато елементів запиту",
|
||||
"query items have invalid item": "Запит містить недійсний елемент",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "The uploaded image for AI recognition exceeds the maximum allowed file size",
|
||||
"no transaction information detected": "No transaction information detected",
|
||||
"user external auth is not found": "User external authentication is not found",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth 2.0 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth 2.0 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth 2.0 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth 2.0 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth 2.0 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth 2.0 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth 2.0 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"oauth2 not enabled": "OAuth 2.0 is not enabled",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 auto registration is not enabled",
|
||||
"invalid oauth2 login request": "Invalid OAuth 2.0 login request",
|
||||
"invalid oauth2 callback": "Invalid OAuth 2.0 callback",
|
||||
"missing state in oauth2 callback": "Missing state parameter in OAuth 2.0 callback",
|
||||
"missing code in oauth2 callback": "Missing code parameter in OAuth 2.0 callback",
|
||||
"invalid state in oauth2 callback": "Invalid state parameter in OAuth 2.0 callback",
|
||||
"cannot retrieve oauth2 token": "Cannot retrieve OAuth 2.0 token",
|
||||
"invalid oauth2 token": "Invalid OAuth 2.0 token",
|
||||
"cannot retrieve user info from oauth2 provider": "Cannot retrieve user info from OAuth 2.0 provider",
|
||||
"query items cannot be blank": "Không có mục truy vấn",
|
||||
"query items too much": "Có quá nhiều mục truy vấn",
|
||||
"query items have invalid item": "Có mục không hợp lệ trong các mục truy vấn",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "用于AI识别的图片超出了允许的最大文件大小",
|
||||
"no transaction information detected": "没有检测到交易信息",
|
||||
"user external auth is not found": "用户外部认证信息不存在",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 没有启用",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 自动注册没有启用",
|
||||
"invalid oauth 2.0 login request": "无效的 OAuth 2.0 登录请求",
|
||||
"invalid oauth 2.0 callback": "无效的 OAuth 2.0 回调请求",
|
||||
"missing state in oauth 2.0 callback": "OAuth 2.0 回调中缺少 state 参数",
|
||||
"missing code in oauth 2.0 callback": "OAuth 2.0 回调中缺少 code 参数",
|
||||
"invalid state in oauth 2.0 callback": "OAuth 2.0 回调中的 state 参数无效",
|
||||
"cannot retrieve oauth 2.0 token": "无法获取 OAuth 2.0 令牌",
|
||||
"invalid oauth 2.0 token": "无效的 OAuth 2.0 令牌",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "无法从 OAuth 2.0 提供者获取用户信息",
|
||||
"oauth2 not enabled": "OAuth 2.0 没有启用",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 自动注册没有启用",
|
||||
"invalid oauth2 login request": "无效的 OAuth 2.0 登录请求",
|
||||
"invalid oauth2 callback": "无效的 OAuth 2.0 回调请求",
|
||||
"missing state in oauth2 callback": "OAuth 2.0 回调中缺少 state 参数",
|
||||
"missing code in oauth2 callback": "OAuth 2.0 回调中缺少 code 参数",
|
||||
"invalid state in oauth2 callback": "OAuth 2.0 回调中的 state 参数无效",
|
||||
"cannot retrieve oauth2 token": "无法获取 OAuth 2.0 令牌",
|
||||
"invalid oauth2 token": "无效的 OAuth 2.0 令牌",
|
||||
"cannot retrieve user info from oauth2 provider": "无法从 OAuth 2.0 提供者获取用户信息",
|
||||
"query items cannot be blank": "请求项目不能为空",
|
||||
"query items too much": "请求项目过多",
|
||||
"query items have invalid item": "请求项目中有非法项目",
|
||||
|
||||
+10
-10
@@ -1242,16 +1242,16 @@
|
||||
"exceed the maximum size of image file for AI recognition": "用於AI識別的圖片超出了允許的最大檔案大小",
|
||||
"no transaction information detected": "沒有檢測到交易資訊",
|
||||
"user external auth is not found": "使用者外部驗證資訊不存在",
|
||||
"oauth 2.0 not enabled": "OAuth 2.0 未啟用",
|
||||
"oauth 2.0 auto registration not enabled": "OAuth 2.0 自動註冊未啟用",
|
||||
"invalid oauth 2.0 login request": "無效的 OAuth 2.0 登入請求",
|
||||
"invalid oauth 2.0 callback": "無效的 OAuth 2.0 回調請求",
|
||||
"missing state in oauth 2.0 callback": "OAuth 2.0 回調中缺少 state 參數",
|
||||
"missing code in oauth 2.0 callback": "OAuth 2.0 回調中缺少 code 參數",
|
||||
"invalid state in oauth 2.0 callback": "OAuth 2.0 回調中的 state 參數無效",
|
||||
"cannot retrieve oauth 2.0 token": "無法獲取 OAuth 2.0 令牌",
|
||||
"invalid oauth 2.0 token": "無效的 OAuth 2.0 令牌",
|
||||
"cannot retrieve user info from oauth 2.0 provider": "無法從 OAuth 2.0 提供者獲取使用者資訊",
|
||||
"oauth2 not enabled": "OAuth 2.0 未啟用",
|
||||
"oauth2 auto registration not enabled": "OAuth 2.0 自動註冊未啟用",
|
||||
"invalid oauth2 login request": "無效的 OAuth 2.0 登入請求",
|
||||
"invalid oauth2 callback": "無效的 OAuth 2.0 回調請求",
|
||||
"missing state in oauth2 callback": "OAuth 2.0 回調中缺少 state 參數",
|
||||
"missing code in oauth2 callback": "OAuth 2.0 回調中缺少 code 參數",
|
||||
"invalid state in oauth2 callback": "OAuth 2.0 回調中的 state 參數無效",
|
||||
"cannot retrieve oauth2 token": "無法獲取 OAuth 2.0 令牌",
|
||||
"invalid oauth2 token": "無效的 OAuth 2.0 令牌",
|
||||
"cannot retrieve user info from oauth2 provider": "無法從 OAuth 2.0 提供者獲取使用者資訊",
|
||||
"query items cannot be blank": "查詢項目不能為空",
|
||||
"query items too much": "查詢項目過多",
|
||||
"query items have invalid item": "查詢項目中有非法項目",
|
||||
|
||||
@@ -235,7 +235,8 @@ const router = createRouter({
|
||||
provider: route.query['provider'],
|
||||
platform: route.query['platform'],
|
||||
userName: route.query['userName'],
|
||||
error: route.query['error']
|
||||
errorCode: route.query['errorCode'],
|
||||
errorMessage: route.query['errorMessage']
|
||||
})
|
||||
},
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<h4 class="text-h4 mb-2">{{ oauth2LoginDisplayName }}</h4>
|
||||
<p class="mb-0" v-if="!error && platform && provider && token && !userName">{{ tt('Logging in...') }}</p>
|
||||
<p class="mb-0" v-else-if="!error && userName">{{ tt('format.misc.oauth2bindTip', { providerName: oauth2ProviderDisplayName, userName: userName }) }}</p>
|
||||
<p class="mb-0" v-else-if="error">{{ tt(error) }}</p>
|
||||
<p class="mb-0" v-else-if="error">{{ te({ error }) }}</p>
|
||||
<p class="mb-0" v-else>{{ tt('An error occurred') }}</p>
|
||||
</v-card-text>
|
||||
|
||||
@@ -106,6 +106,7 @@ import { useLoginPageBase } from '@/views/base/LoginPageBase.ts';
|
||||
import { useRootStore } from '@/stores/index.ts';
|
||||
|
||||
import { ThemeType } from '@/core/theme.ts';
|
||||
import { type ErrorResponse } from '@/core/api.ts';
|
||||
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
|
||||
import { KnownErrorCode } from '@/consts/api.ts';
|
||||
|
||||
@@ -127,13 +128,14 @@ const props = defineProps<{
|
||||
provider?: string;
|
||||
platform?: string;
|
||||
userName?: string;
|
||||
error?: string;
|
||||
errorCode?: string;
|
||||
errorMessage?: string;
|
||||
}>();
|
||||
|
||||
const router = useRouter();
|
||||
const theme = useTheme();
|
||||
|
||||
const { tt, getLocalizedOAuth2ProviderName, getLocalizedOAuth2LoginText } = useI18n();
|
||||
const { tt, te, getLocalizedOAuth2ProviderName, getLocalizedOAuth2LoginText } = useI18n();
|
||||
|
||||
const rootStore = useRootStore();
|
||||
|
||||
@@ -150,6 +152,21 @@ const isDarkMode = computed<boolean>(() => theme.global.name.value === ThemeType
|
||||
const oauth2ProviderDisplayName = computed<string>(() => getLocalizedOAuth2ProviderName(getOAuth2Provider(), getOIDCCustomDisplayNames()));
|
||||
const oauth2LoginDisplayName = computed<string>(() => getLocalizedOAuth2LoginText(getOAuth2Provider(), getOIDCCustomDisplayNames()));
|
||||
|
||||
const error = computed<ErrorResponse | undefined>(() => {
|
||||
if (props.errorCode && props.errorMessage) {
|
||||
const errorResponse: ErrorResponse = {
|
||||
success: false,
|
||||
errorCode: parseInt(props.errorCode),
|
||||
errorMessage: props.errorMessage,
|
||||
path: ''
|
||||
};
|
||||
|
||||
return errorResponse;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
});
|
||||
|
||||
const inputProblemMessage = computed<string | null>(() => {
|
||||
if (!password.value) {
|
||||
return 'Password cannot be blank';
|
||||
@@ -200,7 +217,7 @@ function verifyAndLogin(): void {
|
||||
});
|
||||
}
|
||||
|
||||
if (!props.error && props.platform && props.provider && props.token && !props.userName) {
|
||||
if (!error.value && props.platform && props.provider && props.token && !props.userName) {
|
||||
logining.value = true;
|
||||
|
||||
rootStore.authorizeOAuth2({
|
||||
|
||||
Reference in New Issue
Block a user