I am working on an Angular/Spring Boot web application project and using Keycloak (Server version 15.0.2) for user management. I need to ensure that a specific custom user attribute is unique for each user during the registration process. Currently, I am unsure about the steps required to achieve this and whether it is even possible.
I have explored two potential approaches to address this issue. Firstly, I considered implementing the Service Provider Interface (SPI), but due to my limited experience with Keycloak, I decided to explore the graphical interface (Keycloak admin console) instead. Here are the steps I followed:
- Accessed the Keycloak admin console and selected the appropriate realm.
- Navigated to the "Authentication" tab in the left-sidebar menu.
- Selected the "Flows" sub-tab and chose the "Registration" flow. I encountered a table displaying the available settings for the registration flow Screenshot of registration flow
However, I noticed that the custom attribute I need to make unique is not listed in this table. Instead, it is only accessible in the user's custom attributes section Screenshot of user's specific attributes
At this point, I'm uncertain about the next steps to make the custom attribute unique during user registration. I would greatly appreciate any guidance or suggestions on how to accomplish this.
Note: If the recommended solution involves using the SPI, please provide relevant information and steps to implement it.