I am developing an Android Application with Firebase User Authentication. The problem I am facing is that I get email and password from user and then create that user into firebase. I am not verifying email which user has entered. Now I want to implement reset password feature. For that Firebase provides resetPassword method and send reset password email to that particular user. But the question is that if email is not exist then what should we do?
Here is the code I am using to register user in Firebase:
private void registerUser(){
//creating a new user
firebaseAuth.createUserWithEmailAndPassword("user email here", "user password here")
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
//checking if success
if(task.isSuccessful()){
//display some message here
}else{
//display some message here
}
}
});
}
Please let me know if there is any alternate option available for this feature. Thanks.