PhilanthropyDataCommons / auth

PDC related extensions that were made for the keycloak auth service
1 stars 1 forks source link

Validate users' phone numbers appropriately in `twilio-keycloak-provider` #5

Open bickelj opened 1 year ago

bickelj commented 1 year ago

When a user logs in with the twilio-keycloak-provider configured, a user attribute of mobile_number is required and used to send an SMS. At SMS send time, there is already appropriate validation because Twilio will return an error that successfully propagates out to the keycloak UI such that the user can see it: when_a_bad_phone_number_is_configured_for_user_who_attempts_login_to_public_client

This issue is to validate phone numbers in other places, such as on entry of the number or at other appropriate times in user setup or validation. @jasonaowen said:

I've used Google's libphonenumber before, and it appears to have Java bindings.

Another option is Twilio's separate API for phone number validation.