Created
September 28, 2019 19:47
-
-
Save abhinavraj23/581ed0306ec64ec3c72c71bc115e2587 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mAuth.signInWithEmailAndPassword(email, password) | |
| .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { | |
| @Override | |
| public void onComplete(@NonNull Task<AuthResult> task) { | |
| if (task.isSuccessful()) { | |
| // Sign in success, update UI with the signed-in user's information | |
| Log.d(TAG, "signInWithEmail:success"); | |
| FirebaseUser user = mAuth.getCurrentUser(); | |
| updateUI(user); | |
| } else { | |
| // If sign in fails, display a message to the user. | |
| Log.w(TAG, "signInWithEmail:failure", task.getException()); | |
| Toast.makeText(EmailPasswordActivity.this, "Authentication failed.", | |
| Toast.LENGTH_SHORT).show(); | |
| updateUI(null); | |
| } | |
| // ... | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment