diff --git a/packages/login/src/app/layout.tsx b/packages/login/src/app/layout.tsx index 80c9f0b276..52fabad2f3 100644 --- a/packages/login/src/app/layout.tsx +++ b/packages/login/src/app/layout.tsx @@ -75,9 +75,9 @@ export default async function RootLayout({ redirectUrl = url.toString(); } - /* if (typeof settings !== "string" && settings?.wizardToken) { + if (typeof settings !== "string" && settings?.wizardToken) { redirectUrl = `wizard`; - } */ + } if ( typeof settings !== "string" && diff --git a/packages/login/src/providers/index.tsx b/packages/login/src/providers/index.tsx index a387a4d50d..94c8496730 100644 --- a/packages/login/src/providers/index.tsx +++ b/packages/login/src/providers/index.tsx @@ -58,7 +58,8 @@ export const Providers = ({ ); React.useEffect(() => { - if (redirectURL) window.location.replace(redirectURL); + if (redirectURL && window.location.pathname !== `/${redirectURL}`) + window.location.replace(redirectURL); }, [redirectURL]); const { i18n } = useI18N({