I’m trying to setup a custom SMS provider for MFA with actions. As part of this I need to validate the phone number user has entered before calling the SMS provider to send the message. If validation fails I’d like an error message to be shown to the user and let them try again with entering the right number.
My question is how can I achieve validation and error handling in case the phone number entered is not correct. Does actions support this? Could not find any functions I could call inside the action to show an error message to the user.
Thanks for reaching out to the Auth0 Community!
First, could you please clarify if you’re looking to display some error on the page informing the user that they have submitted an invalid password?
After thoroughly testing, I found that the default Passwordless login has implemented logic to determine if the user’s phone number is valid. However, the custom MFA enrollment with SMS or voice does not and only checks if the phone number submitted is not too short, not too long, and consists of only numbers.
Given that, please allow me some time to investigate this further on phone number validation with MFA enrollment with our Engineering teams.