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-07-31 22:30:32 +02:00
|
|
|
const LoginIdpLinkEmail = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginIdpLinkEmail; i18n: I18n } & KcProps) => {
|
2022-04-25 14:14:03 +03:00
|
|
|
const { url, realm, brokerContext, idpAlias } = kcContext;
|
2022-04-22 17:54:47 +03:00
|
|
|
|
2022-07-31 22:30:32 +02:00
|
|
|
const { msg } = i18n;
|
2022-04-22 17:54:47 +03:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Template
|
2022-07-31 22:30:32 +02:00
|
|
|
{...{ kcContext, i18n, ...props }}
|
2022-04-22 17:54:47 +03:00
|
|
|
doFetchDefaultThemeResources={true}
|
|
|
|
headerNode={msg("emailLinkIdpTitle", idpAlias)}
|
|
|
|
formNode={
|
|
|
|
<>
|
|
|
|
<p id="instruction1" className="instruction">
|
2022-04-25 14:14:03 +03:00
|
|
|
{msg("emailLinkIdp1", idpAlias, brokerContext.username, realm.displayName)}
|
2022-04-22 17:54:47 +03:00
|
|
|
</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;
|