2
votes

I can send reset email as follow :

submit.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            FirebaseAuth auth = FirebaseAuth.getInstance();
            String emailAddress = email.getText().toString();

            auth.sendPasswordResetEmail(emailAddress)
                    .addOnCompleteListener(new OnCompleteListener<Void>() {
                        @Override
                        public void onComplete(@NonNull Task<Void> task) {
                            if (task.isSuccessful()) {
                                Log.d(TAG, "Email sent.");
                            }
                        }
                    });
        }
    });

But after I open the received email, I just found this message with out any action :

Try resetting your password again Your request to reset your password has expired or the link has already been used

How I can reset Password Completely?

1
The code seems fine. The reset link is only valid for a limited amount of time to prevent abuse. If you think you've clicked the link in a reasonable amount of time but are still having this problem, reach out to Firebase support for personalized help in troubleshooting. - Frank van Puffelen
@FrankvanPuffelen yup, i think 2 mint is not that much time, what about have my own website with that, and just use firebase for sending message only? - user7913931
@FrankvanPuffelen i also tried solutions posted here - user7913931
@ArduinoAndroid have you found what is the wrong because am facing similar issue - M.Yogeshwaran

1 Answers

0
votes

try adding addOnSuccessListener in which you can get actual exception or result that why email receive expired reset link..

auth.sendPasswordResetEmail(email)
  .addOnSuccessListener(new OnSuccessListener() {
      public void onSuccess(Void result) {
        // send email succeeded
      }
   }).addOnFailureListener(new OnFailureListener() {
      public onFailure(Exception e)
        // something bad happened
      }
   });