|
16 | 16 | import com.firebase.ui.auth.IdpResponse;
|
17 | 17 | import com.firebase.ui.auth.R;
|
18 | 18 | import com.firebase.ui.auth.ResultCodes;
|
| 19 | +import com.firebase.ui.auth.User; |
19 | 20 | import com.firebase.ui.auth.ui.ExtraConstants;
|
20 | 21 | import com.firebase.ui.auth.ui.FlowParameters;
|
21 | 22 | import com.firebase.ui.auth.ui.TaskFailureLogger;
|
22 |
| -import com.firebase.ui.auth.User; |
23 | 23 | import com.firebase.ui.auth.ui.email.RegisterEmailActivity;
|
24 | 24 | import com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity;
|
25 | 25 | import com.firebase.ui.auth.ui.phone.PhoneVerificationActivity;
|
|
40 | 40 | import com.google.firebase.auth.AuthResult;
|
41 | 41 | import com.google.firebase.auth.EmailAuthProvider;
|
42 | 42 | import com.google.firebase.auth.FacebookAuthProvider;
|
| 43 | +import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException; |
43 | 44 | import com.google.firebase.auth.FirebaseAuthInvalidUserException;
|
44 | 45 | import com.google.firebase.auth.GoogleAuthProvider;
|
45 | 46 | import com.google.firebase.auth.PhoneAuthProvider;
|
@@ -289,7 +290,8 @@ public void onSuccess(AuthResult authResult) {
|
289 | 290 | .addOnFailureListener(new OnFailureListener() {
|
290 | 291 | @Override
|
291 | 292 | public void onFailure(@NonNull Exception e) {
|
292 |
| - if (e instanceof FirebaseAuthInvalidUserException) { |
| 293 | + if (e instanceof FirebaseAuthInvalidUserException |
| 294 | + || e instanceof FirebaseAuthInvalidCredentialsException) { |
293 | 295 | // In this case the credential saved in SmartLock was not
|
294 | 296 | // a valid credential, we should delete it from SmartLock
|
295 | 297 | // before continuing.
|
|
0 commit comments