diff --git a/packages/react-ui/src/app/router.tsx b/packages/react-ui/src/app/router.tsx index 05a8f0cd1f..1b747375a0 100644 --- a/packages/react-ui/src/app/router.tsx +++ b/packages/react-ui/src/app/router.tsx @@ -65,6 +65,10 @@ const createRoutes = () => { FlagId.SHOW_DEMO_HOME_PAGE, ); + const { data: isFederatedLogin } = flagsHooks.useFlag( + FlagId.FEDERATED_LOGIN_ENABLED, + ); + const routes = [ { path: 'flows', @@ -140,61 +144,6 @@ const createRoutes = () => { ), errorElement: , }, - { - path: 'forget-password', - element: ( - - - - - - ), - errorElement: , - }, - { - path: 'reset-password', - element: ( - - - - - - ), - errorElement: , - }, - { - path: 'sign-in', - element: ( - - - - - - ), - errorElement: , - }, - { - path: 'verify-email', - element: ( - - - - - - ), - errorElement: , - }, - { - path: 'sign-up', - element: ( - - - - - - ), - errorElement: , - }, { path: 'settings/appearance', element: ( @@ -278,6 +227,70 @@ const createRoutes = () => { ), errorElement: , }, + ]; + + if (!isFederatedLogin) { + const regularLoginRoutes = [ + { + path: 'forget-password', + element: ( + + + + + + ), + errorElement: , + }, + { + path: 'reset-password', + element: ( + + + + + + ), + errorElement: , + }, + { + path: 'sign-in', + element: ( + + + + + + ), + errorElement: , + }, + { + path: 'verify-email', + element: ( + + + + + + ), + errorElement: , + }, + { + path: 'sign-up', + element: ( + + + + + + ), + errorElement: , + }, + ]; + routes.push(...regularLoginRoutes); + } + + const redirectRoutes = [ { path: 'redirect', element: , @@ -295,6 +308,7 @@ const createRoutes = () => { errorElement: , }, ]; + routes.push(...redirectRoutes); if (isCloudConnectionPageEnabled) { const CloudConnectionPage = lazy(