Keycloak Remove First Name and Last Name fields on Registration Screen

岁酱吖の 提交于 2019-12-21 20:24:32

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/40776626/keycloak-remove-first-name-and-last-name-fields-on-registration-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!