-
Notifications
You must be signed in to change notification settings - Fork 441
Firebase PhoneVerification #462
Comments
it works fine for me. Do you have .catch() for the firebase.registerOrLoginWithPhone() ? Also it's relatively easy to use a previous sms code. |
See this is my code What happen at first scenario Second scenario So the prblm is i m not able to use route.navigate([""]) because it is not returning promise that is the problem |
My guess is that the 2nd scenario is wrong because the user is already logged in. Do you logout the user beetween attemps ? My solution to this problem was that I handled the registration in the loginsucces and everything else in the onAuthStateChange since the user will be automatically logged in if restarts the app after a succesful login. But it's just my 2 cents. I am learning this stuff right now :) |
No I dont logout the user, because user is not logged in yet user has not typed correct code. firebase.getCurrentUser().then(user => { I am not using onAuthStatChanged() handler I am using application setting to maintain the user state Why success and error function is imp for me? login(user: User) { right now I am using this functionality for my app which is on play store available for Indian people only but i expect same thing with phone verification, but i m not able to do this. I know onAuthStateChanged() // firebase.init({ which is basically used to save the state of user logged in or logout |
When user type wrong verification code, and then user again click resend, type correct verification code . User is unable to login. Phone Verification work as expected at the first time, but when user logout and try to re-login then it is not possible. We need to close the application and then login again
The text was updated successfully, but these errors were encountered: