cooperlyt/keycloak-phone-provider

Phone number to be not mandatory and issue in saving phone number

abhijeet-qure opened this issue · 3 comments

Hi @cooperlyt ,

First of all, Thank you so much for this keycloak package and also for actively maintaing it.

For keycloak auth, I want to use the phone auth as the alternative to the main email as username login, where on registration of the new user, they will add their phone number as the optional and as when required they can either login with both Email or Phone.

I had try doing this implementation with this package and hit a few roadblocks where I couldn't move it forward.

To reproduce the issues, i am using keycloak22.x.x of this repo and building the docker and run it locally.

Issue 1 - Phone number to be optional on the registration page

On the registration page, I wanted the phone number to be optional, but it seems it was made mandatory. I'm sharing the configuration below for reference. Is there a way I can configure the phone number on registration to be optional and not mandatory?

issue -2 Phone number is not saved in the user attributes

In the above registration configuration, you can see that I have a phone number field enabled but not its validation. So, during registration, you will see only the phone number field. Now, on the registration page, I am filling in all the details, including my phone number, but after successful registration, I cannot see the phone number in user attribute section on the UI or in the database.

CleanShot 2024-03-07 at 17 06 59@2x

Later, if I tried login this user with email, it worked fine, but whenever sign in with a phone number, it said, user does not found; this guarantees that whenever only a Phone number is enabled on the registration page without its validation, Phone number field is n not getting saved in Database as user attribute.

Can we fix these two issues? This has blocked us from moving forward.

If you need any more information, I am happy to provide it.

Issue 1 - Phone number to be optional on the registration page

Any solution for this?

@cooperlyt Just wanted to check, if you get time to see this issue. Do let me know, if you need more information

Is there any resolution on this? We also need this conditional behavior...