diff --git a/src/frontend/src/functions/auth.tsx b/src/frontend/src/functions/auth.tsx index ec423fecce..4765ec31b7 100644 --- a/src/frontend/src/functions/auth.tsx +++ b/src/frontend/src/functions/auth.tsx @@ -8,7 +8,7 @@ import { ApiEndpoints } from '../enums/ApiEndpoints'; import { apiUrl, useServerApiState } from '../states/ApiState'; import { useLocalState } from '../states/LocalState'; import { useUserState } from '../states/UserState'; -import { type Provider, fetchGlobalStates } from '../states/states'; +import { FlowEnum, type Provider, fetchGlobalStates } from '../states/states'; import { showLoginNotification } from './notifications'; import { generateUrl } from './urls'; @@ -104,7 +104,7 @@ export const doBasicLogin = async ( if (err?.response?.status == 401) { setAuthContext(err.response.data?.data); const mfa_flow = err.response.data.data.flows.find( - (flow: any) => flow.id == 'mfa_authenticate' + (flow: any) => flow.id == FlowEnum.MfaAuthenticate ); if (mfa_flow && mfa_flow.is_pending == true) { success = true; diff --git a/src/frontend/src/pages/Auth/Login.tsx b/src/frontend/src/pages/Auth/Login.tsx index 4c0780e1e7..fee1b337bb 100644 --- a/src/frontend/src/pages/Auth/Login.tsx +++ b/src/frontend/src/pages/Auth/Login.tsx @@ -1,5 +1,5 @@ import { Trans, t } from '@lingui/macro'; -import { Anchor, Divider, Loader, Text } from '@mantine/core'; +import { Anchor, Divider, Group, Loader, Text } from '@mantine/core'; import { useToggle } from '@mantine/hooks'; import { useEffect, useMemo, useState } from 'react'; import { useLocation, useNavigate, useSearchParams } from 'react-router-dom'; @@ -97,7 +97,12 @@ export default function Login() { <> {isLoggingIn ? ( - + <> + + + + Logging you in + ) : ( <> diff --git a/src/frontend/src/pages/Auth/MFA.tsx b/src/frontend/src/pages/Auth/MFA.tsx index a4f377e603..f813590193 100644 --- a/src/frontend/src/pages/Auth/MFA.tsx +++ b/src/frontend/src/pages/Auth/MFA.tsx @@ -13,7 +13,7 @@ export default function Mfa() { const [loginError, setLoginError] = useState(undefined); return ( - + flow.id == 'mfa_reauthenticate' + (flow: any) => flow.id == FlowEnum.MfaReauthenticate ) ) { return ResultType.mfareauth; } else if ( err.response.data.data.flows.find( - (flow: any) => flow.id == 'reauthenticate' + (flow: any) => flow.id == FlowEnum.Reauthenticate ) ) { return ResultType.reauth; diff --git a/src/frontend/src/pages/Index/Settings/SystemSettings.tsx b/src/frontend/src/pages/Index/Settings/SystemSettings.tsx index 4a5e1861fd..eb5eab56ac 100644 --- a/src/frontend/src/pages/Index/Settings/SystemSettings.tsx +++ b/src/frontend/src/pages/Index/Settings/SystemSettings.tsx @@ -64,8 +64,8 @@ export default function SystemSettings() { ) }, { - name: 'login', - label: t`Login`, + name: 'authentication', + label: t`Authentication`, icon: , content: ( { // System Settings await page.locator('label').filter({ hasText: 'System Settings' }).click(); await page.getByText('Base URL', { exact: true }).waitFor(); - await loadTab(page, 'Login'); + await loadTab(page, 'Authentication'); await loadTab(page, 'Barcodes'); await loadTab(page, 'Notifications'); await loadTab(page, 'Pricing');