How to add test phone numbers for firebase phone auth, to skip otp screen or entering a predefined otp.
In the Firebase console, open the Authentication section. In the Sign in method tab, enable the Phone provider if you haven't already. Open the Phone numbers for testing accordion menu. Provide the phone number you want to test, for example: +1 650-555-3434.
What is phone number authentication? Phone number authentication is an authentication method in which a sender sends an SMS message to a receiver's phone. Then, the receiver logs into its phone with a one-time code provided in the SMS message.
Unfortunately, neither the email verification template nor the SMS verification template can be modified. You can select the language from the Firebase Console, however this is a per project setting and you can't modify the templates.
The answer to this problem is you first need to remove you phone number from the Authentication>>Users tab, then firebase will allow your number in test list.
You can test the firebase OTP phone auth on the authentication --> SignIn method as below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With