This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,14 @@ export module auth {
4545 operationType : "SignIn" ,
4646 user : user ,
4747 } ) ;
48- } , ( err => {
49- {
50- let code = 'auth/exception' ;
51- let message = err . toString ( ) ;
52- // Identify code for android. Note that the IOS implementation doesn't return a code.
53- if ( message . includes ( 'com.google.firebase.auth.FirebaseAuthInvalidCredentialsException' ) ) {
54- code = 'auth/wrong-password' ;
55- } else if ( message . includes ( 'com.google.firebase.auth.FirebaseAuthInvalidUserException' ) ) {
56- code = 'auth/user-not-found' ;
48+ } ) . catch ( err => {
49+ let code = 'auth/exception' ;
50+ let message = err . toString ( ) ;
51+ // Identify code for android. Note that the IOS implementation doesn't return a code.
52+ if ( message . includes ( 'com.google.firebase.auth.FirebaseAuthInvalidCredentialsException' ) ) {
53+ code = 'auth/wrong-password' ;
54+ } else if ( message . includes ( 'com.google.firebase.auth.FirebaseAuthInvalidUserException' ) ) {
55+ code = 'auth/user-not-found' ;
5756 // Note that Android returns one exception for both user not found and invalid email whereas
5857 // the web api returns seperate codes. Therefore the conditional below can never be satisfied
5958 // for android.
@@ -62,9 +61,9 @@ export module auth {
6261 }
6362 reject ( {
6463 code : code ,
65- message : message ,
66- } ) ;
67- } ) ) ;
64+ message : message
65+ } )
66+ } ) ;
6867 } ) ;
6968 }
7069
You can’t perform that action at this time.
0 commit comments