Kotlin Firebase Authentication – Send Reset Password Email / Forgot Password | Android

https://grokonez.com/android/kotlin-firebase-authentication-send-reset-password-email-forgot-password-android

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.

I. Way to do

1. Add Firebase Auth to Android App

Read Kotlin Firebase Authentication – How to Sign Up, Sign In, Sign Out, Verify Email | Android and follow steps to enable and implement Firebase Auth in your Android App.

2. Send a password reset email

Use sendPasswordResetEmail() method:


private var mAuth: FirebaseAuth? = null
//...
mAuth = FirebaseAuth.getInstance()

mAuth!!.sendPasswordResetEmail(email)
        .addOnCompleteListener { task ->
            if (task.isSuccessful) {
                // successful!
            } else {
                // failed!
            }
        }

We can customize the email template in Firebase console:
firebase-auth-email-password-mail-template-reset

II. Practice

1. Goal

We will build an Android App that can:

  • create Account, sign in/sign out, send email verification.
  • display current status/user information with verified email status. (all things above are from previous tutorial)
  • send reset password email in case user forgot password.

More at:

https://grokonez.com/android/kotlin-firebase-authentication-send-reset-password-email-forgot-password-android

Kotlin Firebase Authentication – Send Reset Password Email / Forgot Password | Android

Bình luận


White
{{ comment.user.name }}
Bỏ hay Hay
{{comment.like_count}}
Male avatar
{{ comment_error }}
Hủy
   

Hiển thị thử

Chỉnh sửa

Male avatar

loveprogramming

451 bài viết.
79 người follow
Kipalog
{{userFollowed ? 'Following' : 'Follow'}}
Cùng một tác giả
Male avatar
1 0
Tutorial Link: (Link) (Ảnh) Django is a Pythonbased free and opensource web framework that follows the modeltemplateview architectural pattern. A...
loveprogramming viết 6 tháng trước
1 0
Male avatar
1 0
https://loizenai.com/angular11nodejspostgresqlcrudexample/ Angular 11 Node.js PostgreSQL Crud Example (Ảnh) Tutorial: “Angular 11 Node.js Postg...
loveprogramming viết 5 tháng trước
1 0
Male avatar
1 0
Angular Spring Boot jwt Authentication Example Github https://loizenai.com/angularspringbootjwt/ (Ảnh) Tutorial: ” Angular Spring Boot jwt Authe...
loveprogramming viết 5 tháng trước
1 0
Bài viết liên quan
Male avatar
0 0
https://grokonez.com/frontend/angular/angular4firebaseauthemailpasswordauthenticationwithangularfire2emaillogin Angular Firebase Auth Email/Passwo...
loveprogramming viết 2 tháng trước
0 0
{{like_count}}

kipalog

{{ comment_count }}

bình luận

{{liked ? "Đã kipalog" : "Kipalog"}}


Male avatar
{{userFollowed ? 'Following' : 'Follow'}}
451 bài viết.
79 người follow

 Đầu mục bài viết

Vẫn còn nữa! x

Kipalog vẫn còn rất nhiều bài viết hay và chủ đề thú vị chờ bạn khám phá!