Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify phone number not working #89

Open
MoradAbdelgaber opened this issue Feb 8, 2020 · 3 comments
Open

verify phone number not working #89

MoradAbdelgaber opened this issue Feb 8, 2020 · 3 comments

Comments

@MoradAbdelgaber
Copy link

vrifyPhoneNumber method not returning any value .then() function not running although the sms is received. so the verification Id is always undefined.

@imranaalam
Copy link

Please share the code to sort out the problem.

However, have you added you domain in phone auth as valid domain?

@mudam
Copy link

mudam commented Feb 16, 2020

There seem to be several related issues regarding phone auth. I was using firebasex plugin then tried this one. The result (on iOS) is the same - app crashes. On Android needs more investigation.

dpa99c/cordova-plugin-firebasex#305

@vorkapps
Copy link

Did you ever get this working?
When I try the verifyPhoneNumber(phone, timeout) using the number of the installed SIM, the auto-verification occurs despite that I put timeout = 0, I do not receive an SMS and the .then() does not get executed at all, hence there is no verificationId to use in firebase.auth.signInWithCredential() and get the user authenticated for other firebase funcitons.
When I put a phone number of a DIFFERENT SIM than the one installed (I have a 2nd phone with a different number), I RECEIVE the SMS on the 2nd phone, and the .then() function GETS EXECUTED as expected!
Is there a way to either: (a) fix the handling of the timeout=0 and properly receive the SMS and call the .then() function? or (b) receive the verificationId in the onAuthStateChanged event handler, so that we can authenticate the user from code running on this handler instead of the .then() function?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants