Reputation: 449
I migrated my app from using Digits Phone Auth to the new Firebase Phone Auth but while I was testing my app I had troubles signing out my user (Already fixed that) so I just deleted it from the "User list" on the console but now every time I try to sign in with that phone number it won't send me the sms with my code, it works fine with any other number but this one. Does someone knows how can I fix this?
Upvotes: 17
Views: 26074
Reputation: 921
Check if you added your phone number as s test phone number as below and delete it, if it in test numbers:
1- go to firebase console and select your project, then select Authentication
3- go down to phone numbers which adds as test numbers and delete your phone number from this list:
Upvotes: 1
Reputation: 31
I changed my initial loading activity to logout activity through AndroidManifest
file. Here is the final version:
<activity android:name=".OtpActivity"></activity>
<activity android:name=".LoginActivity" />
<activity android:name=".MainActivity" />
<activity android:name=".MainPageActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
MainPageActivity
was my Logout Activity.
Upvotes: 0
Reputation: 954
I had the same issue. It was because of adding my phone number to test phone numbers at the firebase console. Remove it from "test devices" section.)
Upvotes: 53
Reputation: 2424
First check the log, if onVerificationCompleted(PhoneAuthCredential cred)
is called or not. If called then this might be the cases:
EDIT: I had answered the question assuming android environment. These two cases are relevant to android programming only.
Else this might be the case:
To prevent abuse, Firebase enforces a limit on the number of SMS messages that can be sent to a single phone number within a period of time. If you exceed this limit, phone number verification requests might be throttled. If you encounter this issue during development, use a different phone number for testing, or try the request again later.
Refer Authenticate with Firebase on Android using a Phone Number for more information.
Upvotes: 7