Flutter Firebase Phone auth reCaptcha duplicates my login page after verification on iOS #4675
Unanswered
skanderhamdi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a login page with juste one field for phone number and im using Firebase Phone Auth. Everything is okay except when google reCaptcha appeared in the web browser (not google chrome and not Safari, just a web view), after verification, the web browser have to back to my login page but at this time, i see another login page (initState called) above my login page.
Is there anyway to detect at least when reCaptcha finished its job ?
Login function code:
Future login(String mobile) async
{
setState((){loginInProcess=true;sent=null;});
this.phoneNumber = mobile;
FirebaseAuth _auth = FirebaseAuth.instance;
_auth.setSettings(appVerificationDisabledForTesting:false);
_auth.verifyPhoneNumber(
phoneNumber: this.phoneNumber,
timeout: this.expiredCode,
verificationCompleted: _verificationCompleted,
verificationFailed: verificationFailed,
codeSent: codeSent,
codeAutoRetrievalTimeout: codeAutoRetrievalTimeout
).catchError((error){
setState((){loginInProcess=false;sent=false;});
});
}
Beta Was this translation helpful? Give feedback.
All reactions