Skip to content

Client side password validation using PasswordPoliciesΒ #107

Closed as not planned
@waynemorphic

Description

@paulwer and I have been working on password validations to improve the user experience during registration. Keycloak added a passwordPolicies bean that exposes password policy data to Freemarker, which has been pretty helpful. This is what we have been able to achieve so far:

  • Real-time password validation i.e An error is thrown on the client if a password does not meet password policies set
  • Real-time password confirmation i.e. An error is thrown on the client if the password and the password confirmation do not match.
  • This means that these errors do not have to appear on the UI after hitting the Registration button

Issue

Stuck on implementing password validation using checked input fields. This is partly because looping through passwordPolicies is not possible since it is neither a list nor a map. For context, here is an image of possibly what we seek to achieve:
Screenshot 2024-11-17 at 2 04 21 PM

References from other sources:

Some issues I have raised on Keycloak's repo

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions