From 36947e2f47b4298d0598e25bc45bef23fab24ad2 Mon Sep 17 00:00:00 2001 From: Kacy Luzzardi Date: Sun, 20 Apr 2025 06:21:29 +0200 Subject: [PATCH] Update Login.jsx --- client/src/components/Login/Login.jsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/client/src/components/Login/Login.jsx b/client/src/components/Login/Login.jsx index c7ae43b1..6bedd712 100755 --- a/client/src/components/Login/Login.jsx +++ b/client/src/components/Login/Login.jsx @@ -124,7 +124,6 @@ const Login = React.memo( case 'Invalid credentials': case 'Invalid email or username': emailOrUsernameField.current.select(); - break; case 'Invalid password': setData((prevData) => ({ @@ -132,7 +131,6 @@ const Login = React.memo( password: '', })); focusPasswordField(); - break; default: } @@ -143,6 +141,13 @@ const Login = React.memo( passwordField.current.focus(); }, [focusPasswordFieldState]); + useEffect(() => { + const params = new URLSearchParams(window.location.search); + if (params.has('enforce_oidc_login')) { + onAuthenticateUsingOidc(); + } + }, [onAuthenticateUsingOidc]); + return (
@@ -159,7 +164,6 @@ const Login = React.memo(
{message && (