Kotlin Firebase Authentication – Send Reset Password Email / Forgot Password | Android
In previous post, we have known way to implement Sign up, Sign in/out, Verify Email. Today, we continue to take a look at way to send Reset Password Email in case User forgot Password.
*Note: This tutorial bases on code in related post:
Kotlin Firebase Authentication – How to Sign Up, Sign In, Sign Out, Verify Email | Android
We just add an Activity to App for handling Reset Password Email and some statements to old code for logic.
sendPasswordResetEmail()
method:
private var mAuth: FirebaseAuth? = null //... mAuth = FirebaseAuth.getInstance()
mAuth!!.sendPasswordResetEmail(email)
.addOnCompleteListener { task ->
if (task.isSuccessful) {
// successful!
} else {
// failed!
}
}
More at:
Kotlin Firebase Authentication – Send Reset Password Email / Forgot Password | Android
#kotlin #authentication #android #firebase