Skip to content

Commit 70670fd

Browse files
committed
fallback to default page for saml
1 parent 47c1f59 commit 70670fd

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "id.helpwave.de",
3-
"version": "0.1.13",
3+
"version": "0.1.14",
44
"repository": {
55
"type": "git",
66
"url": "git://github.com/helpwave/id.helpwave.de.git"

src/login/KcPage.tsx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Suspense } from 'react'
1+
import { Suspense, lazy } from 'react'
22
import type { KcContext } from './KcContext'
33
import Login from './pages/Login'
44
import Register from './pages/Register'
@@ -31,17 +31,20 @@ import LoginResetOtp from './pages/LoginResetOtp'
3131
import LoginUpdateProfile from './pages/LoginUpdateProfile'
3232
import LoginUsername from './pages/LoginUsername'
3333
import LoginX509Info from './pages/LoginX509Info'
34-
import SamlPostForm from './pages/SamlPostForm'
3534
import SelectAuthenticator from './pages/SelectAuthenticator'
3635
import SelectOrganization from './pages/SelectOrganization'
3736
import UpdateEmail from './pages/UpdateEmail'
3837
import WebauthnAuthenticate from './pages/WebauthnAuthenticate'
3938
import WebauthnError from './pages/WebauthnError'
4039
import WebauthnRegister from './pages/WebauthnRegister'
40+
import DefaultPage from 'keycloakify/login/DefaultPage'
41+
import Template from 'keycloakify/login/Template'
4142
import { HelpwaveLogo } from '@helpwave/hightide'
43+
import { useI18n } from './i18n'
4244

4345
export 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

Comments
 (0)