diff --git a/frontend/public/components/app.jsx b/frontend/public/components/app.jsx index b972b0351a..1b8413eecc 100644 --- a/frontend/public/components/app.jsx +++ b/frontend/public/components/app.jsx @@ -206,8 +206,6 @@ const App = (props) => { } }; - const { productName } = getBrandingDetails(); - const isNotificationDrawerExpanded = useSelector( (state) => !!state.UI.getIn(['notifications', 'isExpanded']), ); @@ -223,8 +221,7 @@ const App = (props) => { }; const content = ( - - + <> { - + ); return ( @@ -324,7 +321,7 @@ const AppRouter = () => { - + } /> {standaloneRouteExtensions.map((e) => ( { }; graphQLReady.onReady(() => { + const { productName } = getBrandingDetails(); store.dispatch(detectFeatures()); // Global timer to ensure all components update in sync @@ -660,19 +658,22 @@ graphQLReady.onReady(() => { }> - - - - - - - + + + + + + + + + + , diff --git a/frontend/public/components/error.tsx b/frontend/public/components/error.tsx index 05ad7d1f23..c9500ae612 100644 --- a/frontend/public/components/error.tsx +++ b/frontend/public/components/error.tsx @@ -96,20 +96,28 @@ const LoginErrorMessage: React.FC = () => { 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} @@ -122,6 +130,7 @@ const LoginErrorMessage: React.FC = () => { export const AuthenticationErrorPage: React.FC = () => { const { t } = useTranslation(); const title = t('public~Authentication error'); + return ( <> {title} @@ -139,7 +148,7 @@ export const AuthenticationErrorPage: React.FC = () => { } customFooter={ - + {t('public~Try again')} } diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index c5ebc2665d..c96c5fc905 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -534,12 +534,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",