narendra kumar
narendra kumar

Reputation: 309

Adding test phone number in firebase phone authentication

How to add test phone numbers for firebase phone auth, to skip otp screen or entering a predefined otp.

Upvotes: 23

Views: 14082

Answers (4)

Sai Kiran Katayath
Sai Kiran Katayath

Reputation: 289

The solution to this issue involves removing your phone number from the Authentication > Users tab. After that, Firebase will allow your number in the test list.

  1. Go to the Firebase console and open your project.
  2. Navigate to the "Authentication" section.
  3. Click on the "Users" tab.
  4. Search for your phone number in the list of users.
  5. Once you find your number, select it and click on the "Delete" or "Remove" option.
  6. Confirm the deletion when prompted.

After removing your phone number from the users list, Firebase will treat it as a new number and allow it in the test list for phone authentication. You can then proceed with testing your phone number in Firebase without any issues.

Remember to make sure you have the necessary dependencies and configurations set up correctly in your project for Firebase phone authentication to work smoothly.

Upvotes: 0

Sadique Khan
Sadique Khan

Reputation: 320

first you need to check two points

  1. Phone number is not present in user tab, if present then remove it from there(Build -> Authentication -> users)
  2. Number is not blocked due to multiple attempt, if number is blocked then try it next day

after that you can add number by going to (Build -> Authentication -> Sign in methods -> Phone), you will find option for adding phone numbers for testing

Upvotes: 7

Zeeshan Ahmed
Zeeshan Ahmed

Reputation: 864

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.

Upvotes: 33

Brahma Datta
Brahma Datta

Reputation: 1112

You can test the firebase OTP phone auth on the authentication --> SignIn method as below.

enter image description here

Upvotes: 5

Related Questions