June 2018
Beginner to intermediate
394 pages
9h 2m
English
When the user has forgotten their password, he can receive a password reset email using the sendPasswordResetEmail method with a string email address as a parameter:
FirebaseAuth auth = FirebaseAuth.getInstance();String emailAddress = "vinisha@krishna.com";auth.sendPasswordResetEmail(emailAddress) .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if (task.isSuccessful()) { Log.d(TAG, "Email sent."); } } });
We can customize the email template and language in the reset mail as well. Once the user receives a mail, he will be able to set the password again. We will explore how to customize the email template in a later section of the chapter.
Read now
Unlock full access