added login-page-expired.ftl
This commit is contained in:
@ -18,6 +18,7 @@ export const pageIds = [
|
|||||||
"login-update-profile.ftl",
|
"login-update-profile.ftl",
|
||||||
"login-update-password.ftl",
|
"login-update-password.ftl",
|
||||||
"login-idp-link-confirm.ftl",
|
"login-idp-link-confirm.ftl",
|
||||||
|
"login-page-expired.ftl",
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export type PageId = typeof pageIds[number];
|
export type PageId = typeof pageIds[number];
|
||||||
|
@ -13,6 +13,7 @@ import { LoginOtp } from "./LoginOtp";
|
|||||||
import { LoginUpdatePassword } from "./LoginUpdatePassword";
|
import { LoginUpdatePassword } from "./LoginUpdatePassword";
|
||||||
import { LoginUpdateProfile } from "./LoginUpdateProfile";
|
import { LoginUpdateProfile } from "./LoginUpdateProfile";
|
||||||
import { LoginIdpLinkConfirm } from "./LoginIdpLinkConfirm";
|
import { LoginIdpLinkConfirm } from "./LoginIdpLinkConfirm";
|
||||||
|
import { LoginPageExpired } from "./LoginPageExpired";
|
||||||
|
|
||||||
export const KcApp = memo(({ kcContext, ...props }: { kcContext: KcContextBase } & KcProps) => {
|
export const KcApp = memo(({ kcContext, ...props }: { kcContext: KcContextBase } & KcProps) => {
|
||||||
switch (kcContext.pageId) {
|
switch (kcContext.pageId) {
|
||||||
@ -40,5 +41,7 @@ export const KcApp = memo(({ kcContext, ...props }: { kcContext: KcContextBase }
|
|||||||
return <LoginUpdateProfile {...{ kcContext, ...props }} />;
|
return <LoginUpdateProfile {...{ kcContext, ...props }} />;
|
||||||
case "login-idp-link-confirm.ftl":
|
case "login-idp-link-confirm.ftl":
|
||||||
return <LoginIdpLinkConfirm {...{ kcContext, ...props }} />;
|
return <LoginIdpLinkConfirm {...{ kcContext, ...props }} />;
|
||||||
|
case "login-page-expired.ftl":
|
||||||
|
return <LoginPageExpired {...{ kcContext, ...props }} />;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
36
src/lib/components/LoginPageExpired.tsx
Normal file
36
src/lib/components/LoginPageExpired.tsx
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import { memo } from "react";
|
||||||
|
import { Template } from "./Template";
|
||||||
|
import type { KcProps } from "./KcProps";
|
||||||
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
import { useKcMessage } from "../i18n/useKcMessage";
|
||||||
|
|
||||||
|
export const LoginPageExpired = memo(({ kcContext, ...props }: { kcContext: KcContextBase.LoginPageExpired } & KcProps) => {
|
||||||
|
const { url } = kcContext;
|
||||||
|
|
||||||
|
const { msg } = useKcMessage();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Template
|
||||||
|
{...{ kcContext, ...props }}
|
||||||
|
doFetchDefaultThemeResources={true}
|
||||||
|
displayMessage={false}
|
||||||
|
headerNode={msg("pageExpiredTitle")}
|
||||||
|
formNode={
|
||||||
|
<>
|
||||||
|
<p id="instruction1" className="instruction">
|
||||||
|
{msg("pageExpiredMsg1")}
|
||||||
|
<a id="loginRestartLink" href={url.loginRestartFlowUrl}>
|
||||||
|
{msg("doClickHere")}
|
||||||
|
</a>{" "}
|
||||||
|
.<br />
|
||||||
|
{msg("pageExpiredMsg2")}{" "}
|
||||||
|
<a id="loginContinueLink" href={url.loginAction}>
|
||||||
|
{msg("doClickHere")}
|
||||||
|
</a>{" "}
|
||||||
|
.
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
});
|
@ -23,7 +23,8 @@ export type KcContextBase =
|
|||||||
| KcContextBase.LoginOtp
|
| KcContextBase.LoginOtp
|
||||||
| KcContextBase.LoginUpdatePassword
|
| KcContextBase.LoginUpdatePassword
|
||||||
| KcContextBase.LoginUpdateProfile
|
| KcContextBase.LoginUpdateProfile
|
||||||
| KcContextBase.LoginIdpLinkConfirm;
|
| KcContextBase.LoginIdpLinkConfirm
|
||||||
|
| KcContextBase.LoginPageExpired;
|
||||||
|
|
||||||
export declare namespace KcContextBase {
|
export declare namespace KcContextBase {
|
||||||
export type Common = {
|
export type Common = {
|
||||||
@ -213,6 +214,10 @@ export declare namespace KcContextBase {
|
|||||||
pageId: "login-idp-link-confirm.ftl";
|
pageId: "login-idp-link-confirm.ftl";
|
||||||
idpAlias: string;
|
idpAlias: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type LoginPageExpired = Common & {
|
||||||
|
pageId: "login-page-expired.ftl";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Attribute = {
|
export type Attribute = {
|
||||||
|
Reference in New Issue
Block a user