diff --git a/frontend/public/components/app.jsx b/frontend/public/components/app.jsx index 462ca032fe2..5a785dedd6e 100644 --- a/frontend/public/components/app.jsx +++ b/frontend/public/components/app.jsx @@ -296,7 +296,7 @@ const AppRouter = () => { - + } /> {standaloneRouteExtensions.map((e) => ( { case 'login_state_error': return t('public~There was an error generating login state.'); case 'cookie_error': - return t('public~There was an error setting login state cookie'); - case 'missing_code': - return t('public~Auth code is missing in query param.'); - case 'missing_state': - return t('public~There was an error parsing your state cookie'); - case 'invalid_code': - return t('public~There was an error logging you in. Please log out and try again.'); - case 'invalid_state': - return t('public~There was an error verifying your session. Please log out and try again.'); + return t('public~There was an error setting login state cookie.'); case 'logout_error': return t('public~There was an error logging you out. Please try again.'); + case 'auth': + // When the error type is set as auth + switch (error) { + case 'missing_state': + return t('public~There was an error parsing your state cookie.'); + case 'invalid_state': + return t( + 'public~There was an error verifying your session. Please log out and try again.', + ); + case 'missing_code': + return t('public~Auth code is missing in query param.'); + case 'invalid_code': + return t('public~There was an error logging you in. Please log out and try again.'); + default: + return t('public~There was an authentication error. Please log out and try again.'); + } default: return ( - + There was an authentication error with the system: {error} @@ -125,6 +135,7 @@ const LoginErrorMessage: React.FC = () => { export const AuthenticationErrorPage: React.FC = () => { const { t } = useTranslation(); const title = t('public~Authentication error'); + return ( <> @@ -143,9 +154,13 @@ export const AuthenticationErrorPage: React.FC = () => { - - {t('public~Try again')} - + + + + + ); diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index e29f9b189d9..5112f14a400 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -514,12 +514,13 @@ "There was a problem processing the request. Please try again.": "There was a problem processing the request. Please try again.", "There was an error generating OAuth client from OIDC client.": "There was an error generating OAuth client from OIDC client.", "There was an error generating login state.": "There was an error generating login state.", - "There was an error setting login state cookie": "There was an error setting login state cookie", + "There was an error setting login state cookie.": "There was an error setting login state cookie.", + "There was an error logging you out. Please try again.": "There was an error logging you out. Please try again.", + "There was an error parsing your state cookie.": "There was an error parsing your state cookie.", + "There was an error verifying your session. Please log out and try again.": "There was an error verifying your session. Please log out and try again.", "Auth code is missing in query param.": "Auth code is missing in query param.", - "There was an error parsing your state cookie": "There was an error parsing your state cookie", "There was an error logging you in. Please log out and try again.": "There was an error logging you in. Please log out and try again.", - "There was an error verifying your session. Please log out and try again.": "There was an error verifying your session. Please log out and try again.", - "There was an error logging you out. Please try again.": "There was an error logging you out. Please try again.", + "There was an authentication error. Please log out and try again.": "There was an authentication error. Please log out and try again.", "There was an authentication error with the system:<1><0>{error}": "There was an authentication error with the system:<1><0>{error}", "Authentication error": "Authentication error", "Try again": "Try again",