How Can I Check user exists in Firebase auth in Signup
Button via react native?
This is my Login Page Code:
export de
Here's how to use the fetchSignInMethodsForEmail
API. It returns an array. If the array is empty, it means the user has never signed up/signed in to your app with the sign in methods you have used in your app.
This is an example with Google signin.
firebase
.auth()
.signInWithPopup(provider)
.then((result) => {
let token = result.credential.accessToken;
let user = result.user;
firebase
.auth()
.fetchSignInMethodsForEmail(user.email)
.then((result) => {
console.log('result', result);
});
})
.catch((error) => {
// Handle Errors here.
}