Having implemented the FireBase phone authentication as per the documentation, I get several problems.
- some numbers cannot be authenticated: I am using Airtel as my service provider.
On the log, I can confirm that the code has been sent but I haven't received it on my phone:
D/PhoneAuthenticating: onCodeSent:AM5PThBss5tbYdpNW5R9Q7o8zOYeHvd7lnZ1KBlS...
- Switching to another carrier, I can receive the code but then it says the SMS code has expired immediately after trying to verify. I make more attempts and result is the same
W/PhoneAuthenticating: signInWithCredential:failure com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The sms code has expired. Please re-send the verification code to try again. at com.google.android.gms.internal.nf.zzK(Unknown Source) at com.google.android.gms.internal.mg.zza(Unknown Source) at com.google.android.gms.internal.oa.zzL(Unknown Source) at com.google.android.gms.internal.oc.onFailure(Unknown Source) at com.google.android.gms.internal.nj.onTransact(Unknown Source) at android.os.Binder.execTransact(Binder.java:446)
This exception is thrown:
FirebaseAuthInvalidCredentialsException
code expiry takes more in than 3599 seconds in firebase. The time taken to verify is less than a minute