// This is a copy paste from https://github.com/InseeFrLab/keycloakify/blob/main/src/lib/components/Register.tsx // It is now up to us to implement a special behavior to leverage the non standard authorizedMailDomains // provided by the plugin: https://github.com/micedre/keycloak-mail-whitelisting installed on our keycloak server. // Note that it is no longer recommended to use register.ftl, it's best to use register-user-profile.ftl // See: https://docs.keycloakify.dev/realtime-input-validation import { memo } from "react"; import Template from "keycloakify/lib/components/Template"; import type { KcProps } from "keycloakify"; import type { KcContext } from "./kcContext"; import { useCssAndCx } from "keycloakify/lib/tools/useCssAndCx"; import type { I18n } from "./i18n"; type KcContext_Register = Extract; const Register = memo(({ kcContext, i18n, ...props }: { kcContext: KcContext_Register; i18n: I18n; } & KcProps) => { const { url, messagesPerField, register, realm, passwordRequired, recaptchaRequired, recaptchaSiteKey } = kcContext; const { msg, msgStr } = i18n; const { cx } = useCssAndCx(); console.log(`NOTE: It is up to you do do something meaningful with ${kcContext.authorizedMailDomains}`) return (