2022-07-30 00:42:07 +02:00
|
|
|
import React, { memo } from "react";
|
2022-07-29 01:31:55 +02:00
|
|
|
import Template from "./Template";
|
2022-04-22 17:54:47 +03:00
|
|
|
import type { KcProps } from "./KcProps";
|
|
|
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
2022-07-31 22:30:32 +02:00
|
|
|
import type { I18n } from "../i18n";
|
2022-04-22 17:54:47 +03:00
|
|
|
|
2022-09-27 21:30:33 +02:00
|
|
|
const LoginIdpLinkEmail = memo(
|
|
|
|
({
|
|
|
|
kcContext,
|
|
|
|
i18n,
|
|
|
|
doFetchDefaultThemeResources = true,
|
|
|
|
...props
|
|
|
|
}: { kcContext: KcContextBase.LoginIdpLinkEmail; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
|
|
|
const { url, realm, brokerContext, idpAlias } = kcContext;
|
2022-04-22 17:54:47 +03:00
|
|
|
|
2022-09-27 21:30:33 +02:00
|
|
|
const { msg } = i18n;
|
2022-04-22 17:54:47 +03:00
|
|
|
|
2022-09-27 21:30:33 +02:00
|
|
|
return (
|
|
|
|
<Template
|
|
|
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
|
|
|
headerNode={msg("emailLinkIdpTitle", idpAlias)}
|
|
|
|
formNode={
|
|
|
|
<>
|
|
|
|
<p id="instruction1" className="instruction">
|
|
|
|
{msg("emailLinkIdp1", idpAlias, brokerContext.username, realm.displayName)}
|
|
|
|
</p>
|
|
|
|
<p id="instruction2" className="instruction">
|
|
|
|
{msg("emailLinkIdp2")} <a href={url.loginAction}>{msg("doClickHere")}</a> {msg("emailLinkIdp3")}
|
|
|
|
</p>
|
|
|
|
<p id="instruction3" className="instruction">
|
|
|
|
{msg("emailLinkIdp4")} <a href={url.loginAction}>{msg("doClickHere")}</a> {msg("emailLinkIdp5")}
|
|
|
|
</p>
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
2022-07-29 01:31:55 +02:00
|
|
|
|
|
|
|
export default LoginIdpLinkEmail;
|