route the pages removed in kc 24 at low level

This commit is contained in:
Joseph Garrone
2024-05-13 03:35:24 +02:00
parent 78517164d4
commit 8d21425ae0
6 changed files with 56 additions and 13 deletions

View File

@ -55,7 +55,6 @@ export default function Fallback(props: FallbackProps) {
case "login.ftl":
return <Login kcContext={kcContext} {...rest} />;
case "register.ftl":
case "register-user-profile.ftl":
return <Register kcContext={kcContext} {...rest} />;
case "info.ftl":
return <Info kcContext={kcContext} {...rest} />;
@ -84,7 +83,6 @@ export default function Fallback(props: FallbackProps) {
case "login-update-password.ftl":
return <LoginUpdatePassword kcContext={kcContext} {...rest} />;
case "login-update-profile.ftl":
case "update-user-profile.ftl":
return <LoginUpdateProfile kcContext={kcContext} {...rest} />;
case "login-idp-link-confirm.ftl":
return <LoginIdpLinkConfirm kcContext={kcContext} {...rest} />;

View File

@ -183,7 +183,7 @@ export declare namespace KcContext {
};
export type Register = Common & {
pageId: "register.ftl" | "register-user-profile.ftl";
pageId: "register.ftl";
profile: UserProfile;
url: {
registrationAction: string;
@ -452,7 +452,7 @@ export declare namespace KcContext {
};
export type LoginUpdateProfile = Common & {
pageId: "login-update-profile.ftl" | "update-user-profile.ftl";
pageId: "login-update-profile.ftl";
profile: UserProfile;
};

View File

@ -7,7 +7,7 @@ import type { I18n } from "../i18n";
import type { LazyOrNot } from "keycloakify/tools/LazyOrNot";
import type { UserProfileFormFieldsProps } from "keycloakify/login/UserProfileFormFields";
type LoginUpdateProfileProps = PageProps<Extract<KcContext, { pageId: "login-update-profile.ftl" | "update-user-profile.ftl" }>, I18n> & {
type LoginUpdateProfileProps = PageProps<Extract<KcContext, { pageId: "login-update-profile.ftl" }>, I18n> & {
UserProfileFormFields: LazyOrNot<(props: UserProfileFormFieldsProps) => JSX.Element>;
};

View File

@ -9,7 +9,7 @@ import { Markdown } from "keycloakify/tools/Markdown";
import type { KcContext } from "../kcContext";
import type { I18n } from "../i18n";
type RegisterProps = PageProps<Extract<KcContext, { pageId: "register.ftl" | "register-user-profile.ftl" }>, I18n> & {
type RegisterProps = PageProps<Extract<KcContext, { pageId: "register.ftl" }>, I18n> & {
UserProfileFormFields: LazyOrNot<(props: UserProfileFormFieldsProps) => JSX.Element>;
};