File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
packages/firebase_ui_auth/lib/src Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,6 @@ Future<fba.UserCredential?> startPhoneMFAVerification({
4848 final hint = resolver.hints.first;
4949 var completer = Completer <fba.UserCredential ?>();
5050
51- completer.future.catchError ((e) {
52- onError? .call (e as FirebaseException );
53- return null ;
54- });
55-
5651 final navigator = Navigator .of (context);
5752
5853 final provider = PhoneAuthProvider ();
@@ -66,12 +61,23 @@ Future<fba.UserCredential?> startPhoneMFAVerification({
6661
6762 provider.authListener = flow;
6863
64+ completer.future.catchError ((e) {
65+ onError? .call (e as FirebaseException );
66+ flow.onError (e);
67+ return null ;
68+ });
69+
6970 final flowKey = Object ();
7071
7172 final actions = [
7273 AuthStateChangeAction <CredentialReceived >((context, inner) {
7374 if (completer.isCompleted) {
7475 completer = Completer <fba.UserCredential >();
76+ completer.future.catchError ((e) {
77+ onError? .call (e as FirebaseException );
78+ flow.onError (e);
79+ return null ;
80+ });
7581 }
7682
7783 final cred = inner.credential as fba.PhoneAuthCredential ;
You can’t perform that action at this time.
0 commit comments