firebase user authentication android studio code example
Example: user login for android studio using firebase
auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this, OnCompleteListener{ task ->
if(task.isSuccessful){
Toast.makeText(this, "Successfully Registered", Toast.LENGTH_LONG).show()
val intent = Intent(this, MainActivity::class.java)
startActivity(intent)
finish()
}else {
Toast.makeText(this, "Registration Failed", Toast.LENGTH_LONG).show()
}
})