Created
June 15, 2022 14:03
-
-
Save theanilpaudel/9a3b4ecef3219dbadfa8036548e1a8fb to your computer and use it in GitHub Desktop.
LoginActivity with code for FirebaseAuthentication using email and password
This file contains 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
bLogin.setOnClickListener { | |
Timber.d("email %s and password %s", email, password) | |
auth.signInWithEmailAndPassword(email, password) | |
.addOnCompleteListener(this@LoginActivity) { task -> | |
if (task.isSuccessful) { | |
Timber.d("signInWithEmail:success") | |
val user = auth.currentUser | |
updateUI(user) | |
} else { | |
task.exception?.printStackTrace() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment