1- import { Suspense } from 'react'
1+ import { Suspense , lazy } from 'react'
22import type { KcContext } from './KcContext'
33import Login from './pages/Login'
44import Register from './pages/Register'
@@ -31,17 +31,20 @@ import LoginResetOtp from './pages/LoginResetOtp'
3131import LoginUpdateProfile from './pages/LoginUpdateProfile'
3232import LoginUsername from './pages/LoginUsername'
3333import LoginX509Info from './pages/LoginX509Info'
34- import SamlPostForm from './pages/SamlPostForm'
3534import SelectAuthenticator from './pages/SelectAuthenticator'
3635import SelectOrganization from './pages/SelectOrganization'
3736import UpdateEmail from './pages/UpdateEmail'
3837import WebauthnAuthenticate from './pages/WebauthnAuthenticate'
3938import WebauthnError from './pages/WebauthnError'
4039import WebauthnRegister from './pages/WebauthnRegister'
40+ import DefaultPage from 'keycloakify/login/DefaultPage'
41+ import Template from 'keycloakify/login/Template'
4142import { HelpwaveLogo } from '@helpwave/hightide'
43+ import { useI18n } from './i18n'
4244
4345export default function KcPage ( props : { kcContext : KcContext } ) {
4446 const { kcContext } = props
47+ const { i18n } = useI18n ( { kcContext } )
4548
4649 return (
4750 < Suspense
@@ -115,8 +118,6 @@ export default function KcPage(props: { kcContext: KcContext }) {
115118 return < LoginUsername kcContext = { kcContext } />
116119 case 'login-x509-info.ftl' :
117120 return < LoginX509Info kcContext = { kcContext } />
118- case 'saml-post-form.ftl' :
119- return < SamlPostForm kcContext = { kcContext } />
120121 case 'select-authenticator.ftl' :
121122 return < SelectAuthenticator kcContext = { kcContext } />
122123 case 'select-organization.ftl' :
@@ -130,11 +131,19 @@ export default function KcPage(props: { kcContext: KcContext }) {
130131 case 'webauthn-register.ftl' :
131132 return < WebauthnRegister kcContext = { kcContext } />
132133 default : {
133- const fallback = kcContext as KcContext
134+ const UserProfileFormFields = lazy (
135+ ( ) => import ( 'keycloakify/login/UserProfileFormFields' )
136+ )
137+
134138 return (
135- < div >
136- < p > Page not implemented: { fallback . pageId } </ p >
137- </ div >
139+ < DefaultPage
140+ kcContext = { kcContext }
141+ i18n = { i18n }
142+ Template = { Template }
143+ doUseDefaultCss = { true }
144+ UserProfileFormFields = { UserProfileFormFields }
145+ doMakeUserConfirmPassword = { true }
146+ />
138147 )
139148 }
140149 }
0 commit comments