From bb44128e126b9903c62bddfa82326c0ab699f690 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Thu, 11 Sep 2025 12:45:38 +0200 Subject: [PATCH] WIP redirection --- src/front/Components/Layouts/Login/StepEmail/index.tsx | 3 ++- src/front/Components/Layouts/LoginCallback/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/front/Components/Layouts/Login/StepEmail/index.tsx b/src/front/Components/Layouts/Login/StepEmail/index.tsx index 85bead77..f9b904ee 100644 --- a/src/front/Components/Layouts/Login/StepEmail/index.tsx +++ b/src/front/Components/Layouts/Login/StepEmail/index.tsx @@ -50,8 +50,9 @@ export default function StepEmail(props: IProps) { }/authorized-client&scope=openid,profile&response_type=code`, ); */ + const redirectUri = 'http://local.4nkweb.com:3000/authorized-client'; router.push( - `https://qual-connexion.idnot.fr/user/IdPOAuth2/authorize/idnot_idp_v1?client_id=B3CE56353EDB15A9&redirect_uri=http://local.lecoffreio.4nkweb:3000/authorized-client&scope=openid,profile&response_type=code`, + `https://qual-connexion.idnot.fr/user/IdPOAuth2/authorize/idnot_idp_v1?client_id=B3CE56353EDB15A9&redirect_uri=${redirectUri}&scope=openid,profile&response_type=code`, ); }, [router]); diff --git a/src/front/Components/Layouts/LoginCallback/index.tsx b/src/front/Components/Layouts/LoginCallback/index.tsx index b28d1672..dcd31de4 100644 --- a/src/front/Components/Layouts/LoginCallback/index.tsx +++ b/src/front/Components/Layouts/LoginCallback/index.tsx @@ -216,8 +216,8 @@ export default function LoginCallBack() { // TODO: review // HACK: If start with http://local.lecoffreio.4nkweb:3000/authorized-client // Replace with http://localhost:3000/authorized-client - if (window.location.href.startsWith('http://local.lecoffreio.4nkweb:3000/authorized-client')) { - window.location.href = window.location.href.replace('http://local.lecoffreio.4nkweb:3000/authorized-client', 'http://localhost:3000/authorized-client'); + if (window.location.href.startsWith('http://local.4nkweb.com')) { + window.location.href = window.location.href.replace('http://local.4nkweb.com:3000/authorized-client', 'http://localhost:3000/authorized-client'); return; }