Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keycloak Remove First Name and Last Name fields on Registration Screen

In Keycloak we have a created a custom ftl registration theme that has removed the optional first name and last name fields. Our system only requires the user to have an email address and password.

However when the user hits enter an error is displayed indicating that the first name and last name need to be entered.

In the Keycloak UserModel these fields are optional, and it is also possible to create users via the admin console / api without firstname and lastname.

How do we remove these fields from the keycloak form validation on the registration screen?

like image 628
shonky linux user Avatar asked Nov 24 '16 01:11

shonky linux user


1 Answers

Profile Validation can be disabled from the Authentication -> Flows area in the Admin Console.

Changing the dropdown option to 'Registration' will display the actions used on the Registration Form. Setting 'Profile Validation' to DISABLED will prevent the RegistrationProfile Form Action from being used.

This will prevent all 3 fields (First Name, Last Name & Email) from being checked, you would probably need to implement your own validation action if you wanted more control over which fields to check.

like image 68
robbo Avatar answered Nov 09 '22 12:11

robbo