diff options
| author | 2023-07-07 17:24:53 +0200 | |
|---|---|---|
| committer | 2023-07-07 17:24:53 +0200 | |
| commit | 117aae9f3332c76f743b4ec3078c9a68b26927f9 (patch) | |
| tree | 7cb083b049d3211095311eeed24fd8386592d5a0 /src | |
| parent | Bump version (diff) | |
https://github.com/keycloakify/keycloakify/issues/377
Diffstat (limited to 'src')
| -rw-r--r-- | src/keycloak-theme/login/pages/shared/UserProfileFormFields.tsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/keycloak-theme/login/pages/shared/UserProfileFormFields.tsx b/src/keycloak-theme/login/pages/shared/UserProfileFormFields.tsx index a95d47b..2d76b2f 100644 --- a/src/keycloak-theme/login/pages/shared/UserProfileFormFields.tsx +++ b/src/keycloak-theme/login/pages/shared/UserProfileFormFields.tsx @@ -25,7 +25,17 @@ export function UserProfileFormFields(props: UserProfileFormFieldsProps) { attributesWithPassword } = useFormValidation({ kcContext, - i18n + i18n, + // Unfortunately, the password policies that you might have defined on the server + // are not made available by Keycloak on the client side. See: https://keycloak.discourse.group/t/make-password-policies-available-to-freemarker/11632 + // Therefore, we have to hardcode the password policies here if we want real-time validation. + // Don't worry, the server will still validate the password when the form is submitted. + "passwordValidators": { + "length": { + "ignore.empty.value": true, + "min": "4" + } + } }); useEffect(() => { |