diff --git a/src/login/KcPage.tsx b/src/login/KcPage.tsx index c6b4bc54..010d4302 100644 --- a/src/login/KcPage.tsx +++ b/src/login/KcPage.tsx @@ -13,6 +13,7 @@ const Login = lazy(() => import("./pages/Login")); const Register = lazy(() => import("./pages/Register")); const LoginUpdateProfile = lazy(() => import("./pages/LoginUpdateProfile")); const LoginUpdatePassword = lazy(() => import("./pages/LoginUpdatePassword")); +const LoginVerifyEmail = lazy(() => import("./pages/LoginVerifyEmail")); const doMakeUserConfirmPassword = false; @@ -77,6 +78,14 @@ export default function KcPage(props: { kcContext: KcContext }) { doUseDefaultCss={false} /> ); + case "login-verify-email.ftl": + return ( + + ); default: return ( ; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + render: () => ( + + ) +}; + +/** + * WithCustomEmail: + * - Purpose: Tests the page with a specific email address. + * - Scenario: Simulates a user with a custom email address to verify the display. + * - Key Aspect: Ensures the email is correctly displayed in the verification message. + */ +export const WithCustomEmail: Story = { + render: () => ( + + ) +}; diff --git a/src/login/pages/LoginVerifyEmail.tsx b/src/login/pages/LoginVerifyEmail.tsx new file mode 100644 index 00000000..afe24fe8 --- /dev/null +++ b/src/login/pages/LoginVerifyEmail.tsx @@ -0,0 +1,64 @@ +import { getKcClsx } from "keycloakify/login/lib/kcClsx"; +import type { PageProps } from "keycloakify/login/pages/PageProps"; +import type { KcContext } from "../KcContext"; +import type { I18n } from "../i18n"; +import Alert from "@codegouvfr/react-dsfr/Alert"; +import { fr } from "@codegouvfr/react-dsfr"; + +export default function LoginVerifyEmail(props: PageProps, I18n>) { + const { kcContext, i18n, doUseDefaultCss, Template, classes } = props; + + const { kcClsx } = getKcClsx({ + doUseDefaultCss, + classes + }); + + const { url, user } = kcContext; + + const { msg, msgStr } = i18n; + + return ( + + ); +}