keycloakify 7.11.6 → 7.11.8
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 +7 -0
- package/login/kcContext/KcContext.d.ts +1 -1
- package/login/pages/RegisterUserProfile.js +2 -2
- package/login/pages/RegisterUserProfile.js.map +1 -1
- package/login/pages/SamlPostForm.js +5 -1
- package/login/pages/SamlPostForm.js.map +1 -1
- package/package.json +1 -1
- package/src/login/kcContext/KcContext.ts +1 -1
- package/src/login/pages/RegisterUserProfile.tsx +3 -3
- package/src/login/pages/SamlPostForm.tsx +5 -3
package/README.md
CHANGED
@@ -39,6 +39,12 @@
|
|
39
39
|
<img src="https://user-images.githubusercontent.com/6702424/110260457-a1c3d380-7fac-11eb-853a-80459b65626b.png">
|
40
40
|
</p>
|
41
41
|
|
42
|
+
> Whether or not React is your preferred framework, Keycloakify
|
43
|
+
> offers a solid option for building Keycloak themes.
|
44
|
+
> It's not just a convenient way to create a Keycloak theme
|
45
|
+
> when using React; it's a well-regarded solution that many
|
46
|
+
> developers appreciate.
|
47
|
+
|
42
48
|
## Sponsor 👼
|
43
49
|
|
44
50
|
We are exclusively sponsored by [Cloud IAM](https://www.cloud-iam.com), a French company offering Keycloak as a service.
|
@@ -98,6 +104,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
98
104
|
</tr>
|
99
105
|
<tr>
|
100
106
|
<td align="center" valign="top" width="14.28%"><a href="https://www.gravitysoftware.be"><img src="https://avatars.githubusercontent.com/u/1140574?v=4?s=100" width="100px;" alt="Thomas Silvestre"/><br /><sub><b>Thomas Silvestre</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=thosil" title="Code">💻</a></td>
|
107
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/satanshiro"><img src="https://avatars.githubusercontent.com/u/38865738?v=4?s=100" width="100px;" alt="satanshiro"/><br /><sub><b>satanshiro</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=satanshiro" title="Code">💻</a></td>
|
101
108
|
</tr>
|
102
109
|
</tbody>
|
103
110
|
</table>
|
@@ -12,7 +12,7 @@ export default function RegisterUserProfile(props) {
|
|
12
12
|
const { url, messagesPerField, recaptchaRequired, recaptchaSiteKey, realm } = kcContext;
|
13
13
|
realm.registrationEmailAsUsername;
|
14
14
|
const { msg, msgStr } = i18n;
|
15
|
-
const [
|
16
|
-
return (_jsx(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { displayMessage: messagesPerField.exists("global"), displayRequiredFields: true, headerNode: msg("registerTitle") }, { children: _jsxs("form", Object.assign({ id: "kc-register-form", className: getClassName("kcFormClass"), action: url.registrationAction, method: "post" }, { children: [_jsx(UserProfileFormFields, { kcContext: kcContext, onIsFormSubmittableValueChange:
|
15
|
+
const [isFormSubmittable, setIsFormSubmittable] = useState(false);
|
16
|
+
return (_jsx(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { displayMessage: messagesPerField.exists("global"), displayRequiredFields: true, headerNode: msg("registerTitle") }, { children: _jsxs("form", Object.assign({ id: "kc-register-form", className: getClassName("kcFormClass"), action: url.registrationAction, method: "post" }, { children: [_jsx(UserProfileFormFields, { kcContext: kcContext, onIsFormSubmittableValueChange: setIsFormSubmittable, i18n: i18n, getClassName: getClassName }), recaptchaRequired && (_jsx("div", Object.assign({ className: "form-group" }, { children: _jsx("div", Object.assign({ className: getClassName("kcInputWrapperClass") }, { children: _jsx("div", { className: "g-recaptcha", "data-size": "compact", "data-sitekey": recaptchaSiteKey }) })) }))), _jsxs("div", Object.assign({ className: getClassName("kcFormGroupClass"), style: { "marginBottom": 30 } }, { children: [_jsx("div", Object.assign({ id: "kc-form-options", className: getClassName("kcFormOptionsClass") }, { children: _jsx("div", Object.assign({ className: getClassName("kcFormOptionsWrapperClass") }, { children: _jsx("span", { children: _jsx("a", Object.assign({ href: url.loginUrl }, { children: msg("backToLogin") })) }) })) })), _jsx("div", Object.assign({ id: "kc-form-buttons", className: getClassName("kcFormButtonsClass") }, { children: _jsx("input", { className: clsx(getClassName("kcButtonClass"), getClassName("kcButtonPrimaryClass"), getClassName("kcButtonBlockClass"), getClassName("kcButtonLargeClass")), type: "submit", value: msgStr("doRegister"), disabled: !isFormSubmittable }) }))] }))] })) })));
|
17
17
|
}
|
18
18
|
//# sourceMappingURL=RegisterUserProfile.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RegisterUserProfile.js","sourceRoot":"","sources":["../../src/login/pages/RegisterUserProfile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAIxE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAmF;IAC3H,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC;QACrC,eAAe;QACf,OAAO;KACV,CAAC,CAAC;IAEH,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;IAExF,KAAK,CAAC,2BAA2B,CAAC;IAElC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE7B,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"RegisterUserProfile.js","sourceRoot":"","sources":["../../src/login/pages/RegisterUserProfile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,E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aAAa,eAAW,SAAS,kBAAe,gBAAgB,GAAI,IACjF,IACJ,CACT,EACD,6BAAK,SAAS,EAAE,YAAY,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,iBAC3E,4BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,YAAY,CAAC,oBAAoB,CAAC,gBACnE,4BAAK,SAAS,EAAE,YAAY,CAAC,2BAA2B,CAAC,gBACrD,yBACI,0BAAG,IAAI,EAAE,GAAG,CAAC,QAAQ,gBAAG,GAAG,CAAC,aAAa,CAAC,IAAK,GAC5C,IACL,IACJ,EAEN,4BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,YAAY,CAAC,oBAAoB,CAAC,gBACnE,gBACI,SAAS,EAAE,IAAI,CACX,YAAY,CAAC,eAAe,CAAC,EAC7B,YAAY,CAAC,sBAAsB,CAAC,EACpC,YAAY,CAAC,oBAAoB,CAAC,EAClC,YAAY,CAAC,oBAAoB,CAAC,CACrC,EACD,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,EAC3B,QAAQ,EAAE,CAAC,iBAAiB,GAC9B,IACA,KACJ,KACH,IACA,CACd,CAAC;AACN,CAAC"}
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useEffect } from "react";
|
2
3
|
export default function SamlPostForm(props) {
|
3
4
|
const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;
|
4
5
|
const { msgStr, msg } = i18n;
|
5
6
|
const { samlPost } = kcContext;
|
6
|
-
|
7
|
+
useEffect(() => {
|
8
|
+
document.forms[0].submit();
|
9
|
+
}, [samlPost]);
|
10
|
+
return (_jsxs(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { displayMessage: false, headerNode: msg("saml.post-form.title") }, { children: [_jsx("p", { children: msg("saml.post-form.message") }), _jsxs("form", Object.assign({ name: "saml-post-binding", method: "post", action: samlPost.url }, { children: [samlPost.SAMLRequest && _jsx("input", { type: "hidden", name: "SAMLRequest", value: samlPost.SAMLRequest }), samlPost.SAMLResponse && _jsx("input", { type: "hidden", name: "SAMLResponse", value: samlPost.SAMLResponse }), samlPost.relayState && _jsx("input", { type: "hidden", name: "RelayState", value: samlPost.relayState }), _jsxs("noscript", { children: [_jsx("p", { children: msg("saml.post-form.js-disabled") }), _jsx("input", { type: "submit", value: msgStr("doContinue") })] })] }))] })));
|
7
11
|
}
|
8
12
|
//# sourceMappingURL=SamlPostForm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SamlPostForm.js","sourceRoot":"","sources":["../../src/login/pages/SamlPostForm.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"SamlPostForm.js","sourceRoot":"","sources":["../../src/login/pages/SamlPostForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAA4E;IAC7G,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAE7B,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,GAAG,EAAE;QACX,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,CACH,MAAC,QAAQ,oBAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,sBAAsB,CAAC,iBACvH,sBAAI,GAAG,CAAC,wBAAwB,CAAC,GAAK,EACtC,8BAAM,IAAI,EAAC,mBAAmB,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,iBAC5D,QAAQ,CAAC,WAAW,IAAI,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,aAAa,EAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,GAAI,EAC/F,QAAQ,CAAC,YAAY,IAAI,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,GAAI,EAClG,QAAQ,CAAC,UAAU,IAAI,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,GAAI,EAC7F,+BACI,sBAAI,GAAG,CAAC,4BAA4B,CAAC,GAAK,EAC1C,gBAAO,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,GAAI,IAC7C,KACR,KACA,CACd,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
@@ -20,7 +20,7 @@ export default function RegisterUserProfile(props: PageProps<Extract<KcContext,
|
|
20
20
|
|
21
21
|
const { msg, msgStr } = i18n;
|
22
22
|
|
23
|
-
const [
|
23
|
+
const [isFormSubmittable, setIsFormSubmittable] = useState(false);
|
24
24
|
|
25
25
|
return (
|
26
26
|
<Template
|
@@ -32,7 +32,7 @@ export default function RegisterUserProfile(props: PageProps<Extract<KcContext,
|
|
32
32
|
<form id="kc-register-form" className={getClassName("kcFormClass")} action={url.registrationAction} method="post">
|
33
33
|
<UserProfileFormFields
|
34
34
|
kcContext={kcContext}
|
35
|
-
onIsFormSubmittableValueChange={
|
35
|
+
onIsFormSubmittableValueChange={setIsFormSubmittable}
|
36
36
|
i18n={i18n}
|
37
37
|
getClassName={getClassName}
|
38
38
|
/>
|
@@ -62,7 +62,7 @@ export default function RegisterUserProfile(props: PageProps<Extract<KcContext,
|
|
62
62
|
)}
|
63
63
|
type="submit"
|
64
64
|
value={msgStr("doRegister")}
|
65
|
-
disabled={!
|
65
|
+
disabled={!isFormSubmittable}
|
66
66
|
/>
|
67
67
|
</div>
|
68
68
|
</div>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { useEffect } from "react";
|
1
2
|
import type { PageProps } from "keycloakify/login/pages/PageProps";
|
2
3
|
import type { KcContext } from "../kcContext";
|
3
4
|
import type { I18n } from "../i18n";
|
@@ -8,15 +9,16 @@ export default function SamlPostForm(props: PageProps<Extract<KcContext, { pageI
|
|
8
9
|
const { msgStr, msg } = i18n;
|
9
10
|
|
10
11
|
const { samlPost } = kcContext;
|
11
|
-
|
12
|
+
useEffect(() => {
|
13
|
+
document.forms[0].submit();
|
14
|
+
}, [samlPost]);
|
12
15
|
return (
|
13
16
|
<Template {...{ kcContext, i18n, doUseDefaultCss, classes }} displayMessage={false} headerNode={msg("saml.post-form.title")}>
|
14
|
-
<script dangerouslySetInnerHTML={{ "__html": `window.onload = function() {document.forms[0].submit()};` }} />
|
15
17
|
<p>{msg("saml.post-form.message")}</p>
|
16
18
|
<form name="saml-post-binding" method="post" action={samlPost.url}>
|
17
19
|
{samlPost.SAMLRequest && <input type="hidden" name="SAMLRequest" value={samlPost.SAMLRequest} />}
|
18
20
|
{samlPost.SAMLResponse && <input type="hidden" name="SAMLResponse" value={samlPost.SAMLResponse} />}
|
19
|
-
{samlPost.
|
21
|
+
{samlPost.relayState && <input type="hidden" name="RelayState" value={samlPost.relayState} />}
|
20
22
|
<noscript>
|
21
23
|
<p>{msg("saml.post-form.js-disabled")}</p>
|
22
24
|
<input type="submit" value={msgStr("doContinue")} />
|