Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pavan5208
Created July 18, 2021 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavan5208/5d16d87687e83ac57c30240802f413cc to your computer and use it in GitHub Desktop.
Save pavan5208/5d16d87687e83ac57c30240802f413cc to your computer and use it in GitHub Desktop.
fun signInUser(email:String, password:String){
auth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(this) { task ->
if (task.isSuccessful) {
// Sign in success, update UI with the signed-in user's information
val user = auth.currentUser
} else {
// If sign in fails, display a message to the user.
Toast.makeText(baseContext, "Authentication failed.",
Toast.LENGTH_SHORT).show()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment