I am using Firebase Authentication SDK for handling password reset functionality in my react app. I am getting a success message even when using a non-registered email. What could be the issue?
const handleSubmit = async (e) => {
e.preventDefault();
setIsLoading(true);
await sendPasswordResetEmail(auth, email)
.then(() => {
setTimeout(() => {
setIsLoading(false);
}, 2000);
toast.success("Password reset link sent!!");
})
.catch((error) => {
const errorMessage = error.message;
setTimeout(() => {
setIsLoading(false);
}, 2000);
toast.error(errorMessage);
});
};