keycloakify 7.0.0-rc.6 → 7.0.0-rc.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.
Files changed (79) hide show
  1. package/bin/eject-keycloak-page.js +1 -1
  2. package/bin/eject-keycloak-page.js.map +1 -1
  3. package/bin/initialize-email-theme.js +6 -2
  4. package/bin/initialize-email-theme.js.map +1 -1
  5. package/lib/usePrepareTemplate.js +2 -2
  6. package/lib/usePrepareTemplate.js.map +1 -1
  7. package/login/Template.js +2 -2
  8. package/login/Template.js.map +1 -1
  9. package/login/TemplateProps.d.ts +1 -1
  10. package/login/TemplateProps.js.map +1 -1
  11. package/login/pages/Error.js +1 -1
  12. package/login/pages/Error.js.map +1 -1
  13. package/login/pages/IdpReviewUserProfile.js +1 -1
  14. package/login/pages/IdpReviewUserProfile.js.map +1 -1
  15. package/login/pages/Info.js +2 -2
  16. package/login/pages/Info.js.map +1 -1
  17. package/login/pages/Login.js +4 -4
  18. package/login/pages/Login.js.map +1 -1
  19. package/login/pages/LoginConfigTotp.js +1 -1
  20. package/login/pages/LoginConfigTotp.js.map +1 -1
  21. package/login/pages/LoginIdpLinkConfirm.js +1 -1
  22. package/login/pages/LoginIdpLinkConfirm.js.map +1 -1
  23. package/login/pages/LoginIdpLinkEmail.js +2 -2
  24. package/login/pages/LoginIdpLinkEmail.js.map +1 -1
  25. package/login/pages/LoginOtp.js +1 -1
  26. package/login/pages/LoginOtp.js.map +1 -1
  27. package/login/pages/LoginPageExpired.js +2 -2
  28. package/login/pages/LoginPageExpired.js.map +1 -1
  29. package/login/pages/LoginPassword.js +1 -1
  30. package/login/pages/LoginPassword.js.map +1 -1
  31. package/login/pages/LoginResetPassword.js +2 -2
  32. package/login/pages/LoginResetPassword.js.map +1 -1
  33. package/login/pages/LoginUpdatePassword.js +1 -1
  34. package/login/pages/LoginUpdatePassword.js.map +1 -1
  35. package/login/pages/LoginUpdateProfile.js +1 -1
  36. package/login/pages/LoginUpdateProfile.js.map +1 -1
  37. package/login/pages/LoginUsername.js +4 -4
  38. package/login/pages/LoginUsername.js.map +1 -1
  39. package/login/pages/LoginVerifyEmail.js +2 -2
  40. package/login/pages/LoginVerifyEmail.js.map +1 -1
  41. package/login/pages/LogoutConfirm.js +2 -2
  42. package/login/pages/LogoutConfirm.js.map +1 -1
  43. package/login/pages/Register.js +1 -1
  44. package/login/pages/Register.js.map +1 -1
  45. package/login/pages/RegisterUserProfile.js +1 -1
  46. package/login/pages/RegisterUserProfile.js.map +1 -1
  47. package/login/pages/Terms.js +2 -2
  48. package/login/pages/Terms.js.map +1 -1
  49. package/login/pages/UpdateUserProfile.js +1 -1
  50. package/login/pages/UpdateUserProfile.js.map +1 -1
  51. package/login/pages/WebauthnAuthenticate.js +1 -1
  52. package/login/pages/WebauthnAuthenticate.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/bin/eject-keycloak-page.ts +1 -1
  55. package/src/bin/initialize-email-theme.ts +9 -1
  56. package/src/lib/usePrepareTemplate.ts +2 -2
  57. package/src/login/Template.tsx +3 -3
  58. package/src/login/TemplateProps.ts +2 -1
  59. package/src/login/pages/Error.tsx +12 -17
  60. package/src/login/pages/IdpReviewUserProfile.tsx +27 -31
  61. package/src/login/pages/Info.tsx +22 -23
  62. package/src/login/pages/Login.tsx +143 -144
  63. package/src/login/pages/LoginConfigTotp.tsx +135 -143
  64. package/src/login/pages/LoginIdpLinkConfirm.tsx +34 -38
  65. package/src/login/pages/LoginIdpLinkEmail.tsx +11 -17
  66. package/src/login/pages/LoginOtp.tsx +44 -48
  67. package/src/login/pages/LoginPageExpired.tsx +14 -21
  68. package/src/login/pages/LoginPassword.tsx +50 -54
  69. package/src/login/pages/LoginResetPassword.tsx +44 -45
  70. package/src/login/pages/LoginUpdatePassword.tsx +96 -100
  71. package/src/login/pages/LoginUpdateProfile.tsx +100 -107
  72. package/src/login/pages/LoginUsername.tsx +108 -109
  73. package/src/login/pages/LoginVerifyEmail.tsx +10 -17
  74. package/src/login/pages/LogoutConfirm.tsx +33 -40
  75. package/src/login/pages/Register.tsx +120 -127
  76. package/src/login/pages/RegisterUserProfile.tsx +36 -37
  77. package/src/login/pages/Terms.tsx +26 -33
  78. package/src/login/pages/UpdateUserProfile.tsx +46 -50
  79. package/src/login/pages/WebauthnAuthenticate.tsx +87 -96
@@ -94,111 +94,102 @@ export default function WebauthnAuthenticate(props: PageProps<Extract<KcContext,
94
94
  const [error, setError] = useState("");
95
95
 
96
96
  return (
97
- <Template
98
- {...{ kcContext, i18n, doUseDefaultCss, classes }}
99
- headerNode={msg("webauthn-login-title")}
100
- formNode={
101
- <div id="kc-form-webauthn" className={getClassName("kcFormClass")}>
102
- <form id="webauth" action={url.loginAction} ref={webAuthForm} method="post">
103
- <input type="hidden" id="clientDataJSON" name="clientDataJSON" value={clientDataJSON} />
104
- <input type="hidden" id="authenticatorData" name="authenticatorData" value={authenticatorData} />
105
- <input type="hidden" id="signature" name="signature" value={signature} />
106
- <input type="hidden" id="credentialId" name="credentialId" value={credentialId} />
107
- <input type="hidden" id="userHandle" name="userHandle" value={userHandle} />
108
- <input type="hidden" id="error" name="error" value={error} />
109
- </form>
110
- <div className={getClassName("kcFormGroupClass")}>
111
- {authenticators &&
112
- (() => (
113
- <form id="authn_select" className={getClassName("kcFormClass")}>
97
+ <Template {...{ kcContext, i18n, doUseDefaultCss, classes }} headerNode={msg("webauthn-login-title")}>
98
+ <div id="kc-form-webauthn" className={getClassName("kcFormClass")}>
99
+ <form id="webauth" action={url.loginAction} ref={webAuthForm} method="post">
100
+ <input type="hidden" id="clientDataJSON" name="clientDataJSON" value={clientDataJSON} />
101
+ <input type="hidden" id="authenticatorData" name="authenticatorData" value={authenticatorData} />
102
+ <input type="hidden" id="signature" name="signature" value={signature} />
103
+ <input type="hidden" id="credentialId" name="credentialId" value={credentialId} />
104
+ <input type="hidden" id="userHandle" name="userHandle" value={userHandle} />
105
+ <input type="hidden" id="error" name="error" value={error} />
106
+ </form>
107
+ <div className={getClassName("kcFormGroupClass")}>
108
+ {authenticators &&
109
+ (() => (
110
+ <form id="authn_select" className={getClassName("kcFormClass")}>
111
+ {authenticators.authenticators.map(authenticator => (
112
+ <input type="hidden" name="authn_use_chk" value={authenticator.credentialId} key={authenticator.credentialId} />
113
+ ))}
114
+ </form>
115
+ ))()}
116
+ {authenticators &&
117
+ shouldDisplayAuthenticators &&
118
+ (() => (
119
+ <>
120
+ {authenticators.authenticators.length > 1 && (
121
+ <p className={getClassName("kcSelectAuthListItemTitle")}>{msg("webauthn-available-authenticators")}</p>
122
+ )}
123
+ <div className={getClassName("kcFormClass")}>
114
124
  {authenticators.authenticators.map(authenticator => (
115
- <input
116
- type="hidden"
117
- name="authn_use_chk"
118
- value={authenticator.credentialId}
119
- key={authenticator.credentialId}
120
- />
121
- ))}
122
- </form>
123
- ))()}
124
- {authenticators &&
125
- shouldDisplayAuthenticators &&
126
- (() => (
127
- <>
128
- {authenticators.authenticators.length > 1 && (
129
- <p className={getClassName("kcSelectAuthListItemTitle")}>{msg("webauthn-available-authenticators")}</p>
130
- )}
131
- <div className={getClassName("kcFormClass")}>
132
- {authenticators.authenticators.map(authenticator => (
133
- <div id="kc-webauthn-authenticator" className={getClassName("kcSelectAuthListItemClass")}>
134
- <div className={getClassName("kcSelectAuthListItemIconClass")}>
135
- <i
136
- className={clsx(
137
- (() => {
138
- const className = getClassName(authenticator.transports.iconClass as any);
139
- return className.includes(" ")
140
- ? className
141
- : [className, getClassName("kcWebAuthnDefaultIcon")];
142
- })(),
143
- getClassName("kcSelectAuthListItemIconPropertyClass")
144
- )}
145
- />
125
+ <div id="kc-webauthn-authenticator" className={getClassName("kcSelectAuthListItemClass")}>
126
+ <div className={getClassName("kcSelectAuthListItemIconClass")}>
127
+ <i
128
+ className={clsx(
129
+ (() => {
130
+ const className = getClassName(authenticator.transports.iconClass as any);
131
+ return className.includes(" ")
132
+ ? className
133
+ : [className, getClassName("kcWebAuthnDefaultIcon")];
134
+ })(),
135
+ getClassName("kcSelectAuthListItemIconPropertyClass")
136
+ )}
137
+ />
138
+ </div>
139
+ <div className={getClassName("kcSelectAuthListItemBodyClass")}>
140
+ <div
141
+ id="kc-webauthn-authenticator-label"
142
+ className={getClassName("kcSelectAuthListItemHeadingClass")}
143
+ >
144
+ {authenticator.label}
146
145
  </div>
147
- <div className={getClassName("kcSelectAuthListItemBodyClass")}>
146
+
147
+ {authenticator.transports && authenticator.transports.displayNameProperties.length && (
148
148
  <div
149
- id="kc-webauthn-authenticator-label"
150
- className={getClassName("kcSelectAuthListItemHeadingClass")}
149
+ id="kc-webauthn-authenticator-transport"
150
+ className={getClassName("kcSelectAuthListItemDescriptionClass")}
151
151
  >
152
- {authenticator.label}
152
+ {authenticator.transports.displayNameProperties.map(
153
+ (transport: MessageKey, index: number) => (
154
+ <>
155
+ <span>{msg(transport)}</span>
156
+ {index < authenticator.transports.displayNameProperties.length - 1 && (
157
+ <span>{", "}</span>
158
+ )}
159
+ </>
160
+ )
161
+ )}
153
162
  </div>
163
+ )}
154
164
 
155
- {authenticator.transports && authenticator.transports.displayNameProperties.length && (
156
- <div
157
- id="kc-webauthn-authenticator-transport"
158
- className={getClassName("kcSelectAuthListItemDescriptionClass")}
159
- >
160
- {authenticator.transports.displayNameProperties.map(
161
- (transport: MessageKey, index: number) => (
162
- <>
163
- <span>{msg(transport)}</span>
164
- {index < authenticator.transports.displayNameProperties.length - 1 && (
165
- <span>{", "}</span>
166
- )}
167
- </>
168
- )
169
- )}
170
- </div>
171
- )}
172
-
173
- <div className={getClassName("kcSelectAuthListItemDescriptionClass")}>
174
- <span id="kc-webauthn-authenticator-created-label">{msg("webauthn-createdAt-label")}</span>
175
- <span id="kc-webauthn-authenticator-created">{authenticator.createdAt}</span>
176
- </div>
165
+ <div className={getClassName("kcSelectAuthListItemDescriptionClass")}>
166
+ <span id="kc-webauthn-authenticator-created-label">{msg("webauthn-createdAt-label")}</span>
167
+ <span id="kc-webauthn-authenticator-created">{authenticator.createdAt}</span>
177
168
  </div>
178
- <div className={getClassName("kcSelectAuthListItemFillClass")} />
179
169
  </div>
180
- ))}
181
- </div>
182
- </>
183
- ))()}
184
- <div id="kc-form-buttons" className={getClassName("kcFormButtonsClass")}>
185
- <input
186
- id="authenticateWebAuthnButton"
187
- type="button"
188
- onClick={webAuthnAuthenticate}
189
- autoFocus={true}
190
- value={msgStr("webauthn-doAuthenticate")}
191
- className={clsx(
192
- getClassName("kcButtonClass"),
193
- getClassName("kcButtonPrimaryClass"),
194
- getClassName("kcButtonBlockClass"),
195
- getClassName("kcButtonLargeClass")
196
- )}
197
- />
198
- </div>
170
+ <div className={getClassName("kcSelectAuthListItemFillClass")} />
171
+ </div>
172
+ ))}
173
+ </div>
174
+ </>
175
+ ))()}
176
+ <div id="kc-form-buttons" className={getClassName("kcFormButtonsClass")}>
177
+ <input
178
+ id="authenticateWebAuthnButton"
179
+ type="button"
180
+ onClick={webAuthnAuthenticate}
181
+ autoFocus={true}
182
+ value={msgStr("webauthn-doAuthenticate")}
183
+ className={clsx(
184
+ getClassName("kcButtonClass"),
185
+ getClassName("kcButtonPrimaryClass"),
186
+ getClassName("kcButtonBlockClass"),
187
+ getClassName("kcButtonLargeClass")
188
+ )}
189
+ />
199
190
  </div>
200
191
  </div>
201
- }
202
- />
192
+ </div>
193
+ </Template>
203
194
  );
204
195
  }