keycloakify 6.7.1 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/tsconfig.tsbuildinfo +1 -1
- package/lib/components/Error.d.ts +6 -3
- package/lib/components/Error.js +4 -4
- package/lib/components/Error.js.map +1 -1
- package/lib/components/IdpReviewUserProfile.d.ts +6 -3
- package/lib/components/IdpReviewUserProfile.js +10 -10
- package/lib/components/IdpReviewUserProfile.js.map +1 -1
- package/lib/components/Info.d.ts +6 -3
- package/lib/components/Info.js +4 -4
- package/lib/components/Info.js.map +1 -1
- package/lib/components/KcApp.d.ts +7 -4
- package/lib/components/KcApp.js +25 -24
- package/lib/components/KcApp.js.map +1 -1
- package/lib/components/Login.d.ts +6 -3
- package/lib/components/Login.js +17 -17
- package/lib/components/Login.js.map +1 -1
- package/lib/components/LoginConfigTotp.d.ts +6 -3
- package/lib/components/LoginConfigTotp.js +25 -25
- package/lib/components/LoginConfigTotp.js.map +1 -1
- package/lib/components/LoginIdpLinkConfirm.d.ts +6 -3
- package/lib/components/LoginIdpLinkConfirm.js +7 -7
- package/lib/components/LoginIdpLinkConfirm.js.map +1 -1
- package/lib/components/LoginIdpLinkEmail.d.ts +6 -3
- package/lib/components/LoginIdpLinkEmail.js +4 -4
- package/lib/components/LoginIdpLinkEmail.js.map +1 -1
- package/lib/components/LoginOtp.d.ts +6 -3
- package/lib/components/LoginOtp.js +19 -19
- package/lib/components/LoginOtp.js.map +1 -1
- package/lib/components/LoginPageExpired.d.ts +6 -3
- package/lib/components/LoginPageExpired.js +4 -4
- package/lib/components/LoginPageExpired.js.map +1 -1
- package/lib/components/LoginPassword.d.ts +6 -3
- package/lib/components/LoginPassword.js +12 -12
- package/lib/components/LoginPassword.js.map +1 -1
- package/lib/components/LoginResetPassword.d.ts +6 -3
- package/lib/components/LoginResetPassword.js +14 -14
- package/lib/components/LoginResetPassword.js.map +1 -1
- package/lib/components/LoginUpdatePassword.d.ts +6 -3
- package/lib/components/LoginUpdatePassword.js +20 -20
- package/lib/components/LoginUpdatePassword.js.map +1 -1
- package/lib/components/LoginUpdateProfile.d.ts +6 -3
- package/lib/components/LoginUpdateProfile.js +31 -31
- package/lib/components/LoginUpdateProfile.js.map +1 -1
- package/lib/components/LoginUsername.d.ts +6 -3
- package/lib/components/LoginUsername.js +13 -13
- package/lib/components/LoginUsername.js.map +1 -1
- package/lib/components/LoginVerifyEmail.d.ts +6 -3
- package/lib/components/LoginVerifyEmail.js +4 -4
- package/lib/components/LoginVerifyEmail.js.map +1 -1
- package/lib/components/LogoutConfirm.d.ts +6 -3
- package/lib/components/LogoutConfirm.js +8 -8
- package/lib/components/LogoutConfirm.js.map +1 -1
- package/lib/components/Register.d.ts +6 -3
- package/lib/components/Register.js +41 -41
- package/lib/components/Register.js.map +1 -1
- package/lib/components/RegisterUserProfile.d.ts +6 -3
- package/lib/components/RegisterUserProfile.js +12 -12
- package/lib/components/RegisterUserProfile.js.map +1 -1
- package/lib/components/Terms.d.ts +6 -3
- package/lib/components/Terms.js +6 -6
- package/lib/components/Terms.js.map +1 -1
- package/lib/components/UpdateUserProfile.d.ts +6 -3
- package/lib/components/UpdateUserProfile.js +11 -11
- package/lib/components/UpdateUserProfile.js.map +1 -1
- package/lib/components/WebauthnAuthenticate.d.ts +6 -3
- package/lib/components/WebauthnAuthenticate.js +18 -18
- package/lib/components/WebauthnAuthenticate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/lib/components/Error.tsx +34 -31
- package/src/lib/components/IdpReviewUserProfile.tsx +50 -47
- package/src/lib/components/Info.tsx +49 -46
- package/src/lib/components/KcApp.tsx +74 -69
- package/src/lib/components/Login.tsx +178 -175
- package/src/lib/components/LoginConfigTotp.tsx +163 -160
- package/src/lib/components/LoginIdpLinkConfirm.tsx +56 -43
- package/src/lib/components/LoginIdpLinkEmail.tsx +34 -31
- package/src/lib/components/LoginOtp.tsx +86 -83
- package/src/lib/components/LoginPageExpired.tsx +38 -35
- package/src/lib/components/LoginPassword.tsx +79 -76
- package/src/lib/components/LoginResetPassword.tsx +67 -64
- package/src/lib/components/LoginUpdatePassword.tsx +105 -102
- package/src/lib/components/LoginUpdateProfile.tsx +108 -105
- package/src/lib/components/LoginUsername.tsx +145 -142
- package/src/lib/components/LoginVerifyEmail.tsx +34 -31
- package/src/lib/components/LogoutConfirm.tsx +57 -54
- package/src/lib/components/Register.tsx +137 -134
- package/src/lib/components/RegisterUserProfile.tsx +63 -60
- package/src/lib/components/Terms.tsx +56 -52
- package/src/lib/components/UpdateUserProfile.tsx +61 -58
- package/src/lib/components/WebauthnAuthenticate.tsx +179 -178
@@ -1,192 +1,195 @@
|
|
1
1
|
import React, { memo } from "react";
|
2
|
-
import
|
2
|
+
import DefaultTemplate from "./Template";
|
3
|
+
import type { TemplateProps } from "./Template";
|
3
4
|
import type { KcProps } from "./KcProps";
|
4
5
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
5
6
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
6
7
|
import type { I18n } from "../i18n";
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
}: { kcContext: KcContextBase.LoginConfigTotp; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
15
|
-
const { url, isAppInitiatedAction, totp, mode, messagesPerField } = kcContext;
|
9
|
+
export type LoginConfigTotpProps = KcProps & {
|
10
|
+
kcContext: KcContextBase.LoginConfigTotp;
|
11
|
+
i18n: I18n;
|
12
|
+
doFetchDefaultThemeResources?: boolean;
|
13
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
14
|
+
};
|
16
15
|
|
17
|
-
|
16
|
+
const LoginConfigTotp = memo((props: LoginConfigTotpProps) => {
|
17
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate, ...kcProps } = props;
|
18
18
|
|
19
|
-
|
19
|
+
const { url, isAppInitiatedAction, totp, mode, messagesPerField } = kcContext;
|
20
20
|
|
21
|
-
|
22
|
-
HmacSHA1: "SHA1",
|
23
|
-
HmacSHA256: "SHA256",
|
24
|
-
HmacSHA512: "SHA512"
|
25
|
-
};
|
21
|
+
const { cx } = useCssAndCx();
|
26
22
|
|
27
|
-
|
28
|
-
<Template
|
29
|
-
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
30
|
-
headerNode={msg("loginTotpTitle")}
|
31
|
-
formNode={
|
32
|
-
<>
|
33
|
-
<ol id="kc-totp-settings">
|
34
|
-
<li>
|
35
|
-
<p>{msg("loginTotpStep1")}</p>
|
23
|
+
const { msg, msgStr } = i18n;
|
36
24
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
</li>
|
25
|
+
const algToKeyUriAlg: Record<KcContextBase.LoginConfigTotp["totp"]["policy"]["algorithm"], string> = {
|
26
|
+
"HmacSHA1": "SHA1",
|
27
|
+
"HmacSHA256": "SHA256",
|
28
|
+
"HmacSHA512": "SHA512"
|
29
|
+
};
|
43
30
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
</li>
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
</li>
|
64
|
-
<li id="kc-totp-algorithm">
|
65
|
-
{msg("loginTotpAlgorithm")}: {algToKeyUriAlg?.[totp.policy.algorithm] ?? totp.policy.algorithm}
|
66
|
-
</li>
|
67
|
-
<li id="kc-totp-digits">
|
68
|
-
{msg("loginTotpDigits")}: {totp.policy.digits}
|
69
|
-
</li>
|
70
|
-
{totp.policy.type === "totp" ? (
|
71
|
-
<li id="kc-totp-period">
|
72
|
-
{msg("loginTotpInterval")}: {totp.policy.period}
|
73
|
-
</li>
|
74
|
-
) : (
|
75
|
-
<li id="kc-totp-counter">
|
76
|
-
{msg("loginTotpCounter")}: {totp.policy.initialCounter}
|
77
|
-
</li>
|
78
|
-
)}
|
79
|
-
</ul>
|
80
|
-
</p>
|
81
|
-
</li>
|
82
|
-
</>
|
83
|
-
) : (
|
31
|
+
return (
|
32
|
+
<Template
|
33
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...kcProps }}
|
34
|
+
headerNode={msg("loginTotpTitle")}
|
35
|
+
formNode={
|
36
|
+
<>
|
37
|
+
<ol id="kc-totp-settings">
|
38
|
+
<li>
|
39
|
+
<p>{msg("loginTotpStep1")}</p>
|
40
|
+
|
41
|
+
<ul id="kc-totp-supported-apps">
|
42
|
+
{totp.policy.supportedApplications.map(app => (
|
43
|
+
<li>{app}</li>
|
44
|
+
))}
|
45
|
+
</ul>
|
46
|
+
</li>
|
47
|
+
|
48
|
+
{mode && mode == "manual" ? (
|
49
|
+
<>
|
84
50
|
<li>
|
85
|
-
<p>{msg("
|
86
|
-
<img id="kc-totp-secret-qr-code" src={`data:image/png;base64, ${totp.totpSecretQrCode}`} alt="Figure: Barcode" />
|
87
|
-
<br />
|
51
|
+
<p>{msg("loginTotpManualStep2")}</p>
|
88
52
|
<p>
|
89
|
-
<
|
90
|
-
|
53
|
+
<span id="kc-totp-secret-key">{totp.totpSecretEncoded}</span>
|
54
|
+
</p>
|
55
|
+
<p>
|
56
|
+
<a href={totp.qrUrl} id="mode-barcode">
|
57
|
+
{msg("loginTotpScanBarcode")}
|
91
58
|
</a>
|
92
59
|
</p>
|
93
60
|
</li>
|
94
|
-
|
61
|
+
<li>
|
62
|
+
<p>{msg("loginTotpManualStep3")}</p>
|
63
|
+
<p>
|
64
|
+
<ul>
|
65
|
+
<li id="kc-totp-type">
|
66
|
+
{msg("loginTotpType")}: {msg(`loginTotp.${totp.policy.type}`)}
|
67
|
+
</li>
|
68
|
+
<li id="kc-totp-algorithm">
|
69
|
+
{msg("loginTotpAlgorithm")}: {algToKeyUriAlg?.[totp.policy.algorithm] ?? totp.policy.algorithm}
|
70
|
+
</li>
|
71
|
+
<li id="kc-totp-digits">
|
72
|
+
{msg("loginTotpDigits")}: {totp.policy.digits}
|
73
|
+
</li>
|
74
|
+
{totp.policy.type === "totp" ? (
|
75
|
+
<li id="kc-totp-period">
|
76
|
+
{msg("loginTotpInterval")}: {totp.policy.period}
|
77
|
+
</li>
|
78
|
+
) : (
|
79
|
+
<li id="kc-totp-counter">
|
80
|
+
{msg("loginTotpCounter")}: {totp.policy.initialCounter}
|
81
|
+
</li>
|
82
|
+
)}
|
83
|
+
</ul>
|
84
|
+
</p>
|
85
|
+
</li>
|
86
|
+
</>
|
87
|
+
) : (
|
95
88
|
<li>
|
96
|
-
<p>{msg("
|
97
|
-
<
|
89
|
+
<p>{msg("loginTotpStep2")}</p>
|
90
|
+
<img id="kc-totp-secret-qr-code" src={`data:image/png;base64, ${totp.totpSecretQrCode}`} alt="Figure: Barcode" />
|
91
|
+
<br />
|
92
|
+
<p>
|
93
|
+
<a href={totp.manualUrl} id="mode-manual">
|
94
|
+
{msg("loginTotpUnableToScan")}
|
95
|
+
</a>
|
96
|
+
</p>
|
98
97
|
</li>
|
99
|
-
|
98
|
+
)}
|
99
|
+
<li>
|
100
|
+
<p>{msg("loginTotpStep3")}</p>
|
101
|
+
<p>{msg("loginTotpStep3DeviceName")}</p>
|
102
|
+
</li>
|
103
|
+
</ol>
|
100
104
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
105
|
+
<form action={url.loginAction} className={cx(kcProps.kcFormClass)} id="kc-totp-settings-form" method="post">
|
106
|
+
<div className={cx(kcProps.kcFormGroupClass)}>
|
107
|
+
<div className={cx(kcProps.kcInputWrapperClass)}>
|
108
|
+
<label htmlFor="totp" className={cx(kcProps.kcLabelClass)}>
|
109
|
+
{msg("authenticatorCode")}
|
110
|
+
</label>{" "}
|
111
|
+
<span className="required">*</span>
|
112
|
+
</div>
|
113
|
+
<div className={cx(kcProps.kcInputWrapperClass)}>
|
114
|
+
<input
|
115
|
+
type="text"
|
116
|
+
id="totp"
|
117
|
+
name="totp"
|
118
|
+
autoComplete="off"
|
119
|
+
className={cx(kcProps.kcInputClass)}
|
120
|
+
aria-invalid={messagesPerField.existsError("totp")}
|
121
|
+
/>
|
118
122
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
</div>
|
125
|
-
<input type="hidden" id="totpSecret" name="totpSecret" value={totp.totpSecret} />
|
126
|
-
{mode && <input type="hidden" id="mode" value={mode} />}
|
123
|
+
{messagesPerField.existsError("totp") && (
|
124
|
+
<span id="input-error-otp-code" className={cx(kcProps.kcInputErrorMessageClass)} aria-live="polite">
|
125
|
+
{messagesPerField.get("totp")}
|
126
|
+
</span>
|
127
|
+
)}
|
127
128
|
</div>
|
129
|
+
<input type="hidden" id="totpSecret" name="totpSecret" value={totp.totpSecret} />
|
130
|
+
{mode && <input type="hidden" id="mode" value={mode} />}
|
131
|
+
</div>
|
128
132
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
</div>
|
133
|
+
<div className={cx(kcProps.kcFormGroupClass)}>
|
134
|
+
<div className={cx(kcProps.kcInputWrapperClass)}>
|
135
|
+
<label htmlFor="userLabel" className={cx(kcProps.kcLabelClass)}>
|
136
|
+
{msg("loginTotpDeviceName")}
|
137
|
+
</label>{" "}
|
138
|
+
{totp.otpCredentials.length >= 1 && <span className="required">*</span>}
|
139
|
+
</div>
|
140
|
+
<div className={cx(kcProps.kcInputWrapperClass)}>
|
141
|
+
<input
|
142
|
+
type="text"
|
143
|
+
id="userLabel"
|
144
|
+
name="userLabel"
|
145
|
+
autoComplete="off"
|
146
|
+
className={cx(kcProps.kcInputClass)}
|
147
|
+
aria-invalid={messagesPerField.existsError("userLabel")}
|
148
|
+
/>
|
149
|
+
{messagesPerField.existsError("userLabel") && (
|
150
|
+
<span id="input-error-otp-label" className={cx(kcProps.kcInputErrorMessageClass)} aria-live="polite">
|
151
|
+
{messagesPerField.get("userLabel")}
|
152
|
+
</span>
|
153
|
+
)}
|
151
154
|
</div>
|
155
|
+
</div>
|
152
156
|
|
153
|
-
|
154
|
-
|
155
|
-
<input
|
156
|
-
type="submit"
|
157
|
-
className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonLargeClass)}
|
158
|
-
id="saveTOTPBtn"
|
159
|
-
value={msgStr("doSubmit")}
|
160
|
-
/>
|
161
|
-
<button
|
162
|
-
type="submit"
|
163
|
-
className={cx(
|
164
|
-
props.kcButtonClass,
|
165
|
-
props.kcButtonDefaultClass,
|
166
|
-
props.kcButtonLargeClass,
|
167
|
-
props.kcButtonLargeClass
|
168
|
-
)}
|
169
|
-
id="cancelTOTPBtn"
|
170
|
-
name="cancel-aia"
|
171
|
-
value="true"
|
172
|
-
>
|
173
|
-
${msg("doCancel")}
|
174
|
-
</button>
|
175
|
-
</>
|
176
|
-
) : (
|
157
|
+
{isAppInitiatedAction ? (
|
158
|
+
<>
|
177
159
|
<input
|
178
160
|
type="submit"
|
179
|
-
className={cx(
|
161
|
+
className={cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonLargeClass)}
|
180
162
|
id="saveTOTPBtn"
|
181
163
|
value={msgStr("doSubmit")}
|
182
164
|
/>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
)
|
165
|
+
<button
|
166
|
+
type="submit"
|
167
|
+
className={cx(
|
168
|
+
kcProps.kcButtonClass,
|
169
|
+
kcProps.kcButtonDefaultClass,
|
170
|
+
kcProps.kcButtonLargeClass,
|
171
|
+
kcProps.kcButtonLargeClass
|
172
|
+
)}
|
173
|
+
id="cancelTOTPBtn"
|
174
|
+
name="cancel-aia"
|
175
|
+
value="true"
|
176
|
+
>
|
177
|
+
${msg("doCancel")}
|
178
|
+
</button>
|
179
|
+
</>
|
180
|
+
) : (
|
181
|
+
<input
|
182
|
+
type="submit"
|
183
|
+
className={cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonLargeClass)}
|
184
|
+
id="saveTOTPBtn"
|
185
|
+
value={msgStr("doSubmit")}
|
186
|
+
/>
|
187
|
+
)}
|
188
|
+
</form>
|
189
|
+
</>
|
190
|
+
}
|
191
|
+
/>
|
192
|
+
);
|
193
|
+
});
|
191
194
|
|
192
195
|
export default LoginConfigTotp;
|
@@ -1,54 +1,67 @@
|
|
1
1
|
import React, { memo } from "react";
|
2
|
-
import
|
2
|
+
import DefaultTemplate from "./Template";
|
3
|
+
import type { TemplateProps } from "./Template";
|
3
4
|
import type { KcProps } from "./KcProps";
|
4
5
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
5
6
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
6
7
|
import type { I18n } from "../i18n";
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
}: { kcContext: KcContextBase.LoginIdpLinkConfirm; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
15
|
-
const { url, idpAlias } = kcContext;
|
9
|
+
export type LoginIdpLinkConfirmProps = KcProps & {
|
10
|
+
kcContext: KcContextBase.LoginIdpLinkConfirm;
|
11
|
+
i18n: I18n;
|
12
|
+
doFetchDefaultThemeResources?: boolean;
|
13
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
14
|
+
};
|
16
15
|
|
17
|
-
|
16
|
+
const LoginIdpLinkConfirm = memo((props: LoginIdpLinkConfirmProps) => {
|
17
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate, ...kcProps } = props;
|
18
18
|
|
19
|
-
|
19
|
+
const { url, idpAlias } = kcContext;
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
21
|
+
const { msg } = i18n;
|
22
|
+
|
23
|
+
const { cx } = useCssAndCx();
|
24
|
+
|
25
|
+
return (
|
26
|
+
<Template
|
27
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...kcProps }}
|
28
|
+
headerNode={msg("confirmLinkIdpTitle")}
|
29
|
+
formNode={
|
30
|
+
<form id="kc-register-form" action={url.loginAction} method="post">
|
31
|
+
<div className={cx(kcProps.kcFormGroupClass)}>
|
32
|
+
<button
|
33
|
+
type="submit"
|
34
|
+
className={cx(
|
35
|
+
kcProps.kcButtonClass,
|
36
|
+
kcProps.kcButtonDefaultClass,
|
37
|
+
kcProps.kcButtonBlockClass,
|
38
|
+
kcProps.kcButtonLargeClass
|
39
|
+
)}
|
40
|
+
name="submitAction"
|
41
|
+
id="updateProfile"
|
42
|
+
value="updateProfile"
|
43
|
+
>
|
44
|
+
{msg("confirmLinkIdpReviewProfile")}
|
45
|
+
</button>
|
46
|
+
<button
|
47
|
+
type="submit"
|
48
|
+
className={cx(
|
49
|
+
kcProps.kcButtonClass,
|
50
|
+
kcProps.kcButtonDefaultClass,
|
51
|
+
kcProps.kcButtonBlockClass,
|
52
|
+
kcProps.kcButtonLargeClass
|
53
|
+
)}
|
54
|
+
name="submitAction"
|
55
|
+
id="linkAccount"
|
56
|
+
value="linkAccount"
|
57
|
+
>
|
58
|
+
{msg("confirmLinkIdpContinue", idpAlias)}
|
59
|
+
</button>
|
60
|
+
</div>
|
61
|
+
</form>
|
62
|
+
}
|
63
|
+
/>
|
64
|
+
);
|
65
|
+
});
|
53
66
|
|
54
67
|
export default LoginIdpLinkConfirm;
|
@@ -1,40 +1,43 @@
|
|
1
1
|
import React, { memo } from "react";
|
2
|
-
import
|
2
|
+
import DefaultTemplate from "./Template";
|
3
|
+
import type { TemplateProps } from "./Template";
|
3
4
|
import type { KcProps } from "./KcProps";
|
4
5
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
5
6
|
import type { I18n } from "../i18n";
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
}: { kcContext: KcContextBase.LoginIdpLinkEmail; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
14
|
-
const { url, realm, brokerContext, idpAlias } = kcContext;
|
8
|
+
export type LoginIdpLinkEmailProps = KcProps & {
|
9
|
+
kcContext: KcContextBase.LoginIdpLinkEmail;
|
10
|
+
i18n: I18n;
|
11
|
+
doFetchDefaultThemeResources?: boolean;
|
12
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
13
|
+
};
|
15
14
|
|
16
|
-
|
15
|
+
const LoginIdpLinkEmail = memo((props: LoginIdpLinkEmailProps) => {
|
16
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate, ...kcProps } = props;
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
</
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
18
|
+
const { url, realm, brokerContext, idpAlias } = kcContext;
|
19
|
+
|
20
|
+
const { msg } = i18n;
|
21
|
+
|
22
|
+
return (
|
23
|
+
<Template
|
24
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...kcProps }}
|
25
|
+
headerNode={msg("emailLinkIdpTitle", idpAlias)}
|
26
|
+
formNode={
|
27
|
+
<>
|
28
|
+
<p id="instruction1" className="instruction">
|
29
|
+
{msg("emailLinkIdp1", idpAlias, brokerContext.username, realm.displayName)}
|
30
|
+
</p>
|
31
|
+
<p id="instruction2" className="instruction">
|
32
|
+
{msg("emailLinkIdp2")} <a href={url.loginAction}>{msg("doClickHere")}</a> {msg("emailLinkIdp3")}
|
33
|
+
</p>
|
34
|
+
<p id="instruction3" className="instruction">
|
35
|
+
{msg("emailLinkIdp4")} <a href={url.loginAction}>{msg("doClickHere")}</a> {msg("emailLinkIdp5")}
|
36
|
+
</p>
|
37
|
+
</>
|
38
|
+
}
|
39
|
+
/>
|
40
|
+
);
|
41
|
+
});
|
39
42
|
|
40
43
|
export default LoginIdpLinkEmail;
|