From 7d97eb4fe21884bea6dbb0bef25333f84c1fc8da Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 15 Mar 2024 17:41:59 +0100 Subject: [PATCH] allow multiple oidc providers --- src/components/Login/Login.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Login/Login.jsx b/src/components/Login/Login.jsx index 55e0070..d335d88 100644 --- a/src/components/Login/Login.jsx +++ b/src/components/Login/Login.jsx @@ -54,9 +54,14 @@ function Login({ intl }) { }, [startedOAuth, loginOAuthValues]); const onSelectProvider = (provider) => { - setStartedOAuth(true); setCookie('return_url', getReturnUrl(location), { path: '/' }); - dispatch(authomaticRedirect(provider.id)); + if (provider.plugin === 'oidc') { + setStartedOIDC(true); + dispatch(oidcRedirect(provider.id)); + } else { + setStartedOAuth(true); + dispatch(authomaticRedirect(provider.id)); + } }; useEffect(() => {