I am using Firebase authentication in my React Native application development. The problem I am facing is On implementing reset password functionality users receiving emails even though they are not a registered user in Firebase.
1) How can I send reset password emails only for Firebase registered users ?
2) How can I achieve this from frontend side(React Native) ?
Here is the code I am using.
import firebase from '@react-native-firebase/app';
export function onForgotPassword(email: string) {
firebase
.auth()
.sendPasswordResetEmail(email)
.then(() => {
// alert('Please check your email...');
})
.catch((e) => {
NLog.log(e);
});
}
I have solved this issue using fetchSignInMethodsForEmail to check if an email address is known for any provider before trying to send a reset message to it.
I am using Firebase authentication in my React Native application development. The problem I am facing is On implementing reset password functionality users receiving emails even though they are not a registered user in Firebase.
1) How can I send reset password emails only for Firebase registered users ?
2) How can I achieve this from frontend side(React Native) ?
Here is the code I am using.
Thanks in advance.