Forgot password via email

import { getAuth, sendPasswordResetEmail } from "firebase/auth";
import { auth } from "../Configs/firebase";

sendPasswordResetEmail(auth, email)
  .then(() => {
    // Password reset email sent!
    // ..
  })
  .catch((error) => {
    const errorCode = error.code;
    const errorMessage = error.message;
    // ..
  });

Last updated

Was this helpful?