Problem statement
A partner application (in this case a bank mobile app) will redirect the user to our application and we want to authenticate the user by using the email and phone number that the partner has already shared with us.
Flow example:
John Doe is logged in Bank XYZ mobile app and goes to the benefits session. The bank backend call an API on our backend to create a customer with: email + phone number + personal and business data, like the benefits of the credit card of this customer.
The bank mobile app transfers the flow to our portal and it sends email and phone number (imagine in querystring to make it simple). We need to authenticate the user by ensuring the user owns the email and phone number.
Is there any way to pre-register the phone or at least pre-fill it?
Solution
Call like this to prefill user’s SMS:
PUT [https://test-partners-sandbox01.eu.auth0.com/api/v2/users/email|644701dfdd30a412dasfc4b2af4c5/authentication-methods](https://axa-partners-sandbox01.eu.auth0.com/api/v2/users/email%7C6447012edsazxz1dfdd30a4fc4b2af4c5/authentication-methods)
[{ "type": "phone", "preferred_authentication_method": "sms", "phone_number": "+34.....4", "name": "SMS" }]