Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

617
Views
Firebase: Error (auth/missing-email) when the email definetly exists. Reactjs

Here is my code:

function loginWithEmailHandler() {
        signInWithEmailAndPassword(auth)
        .then((result) => {
            const user = result.user;
            console.log(user.email, user.displayName);
            navigate("/");
        })
        .catch((error) => {
            const errorCode = error.code;
            const errorMessage = error.message;
            setMode("INCORRECT");
            console.log(errorCode, errorMessage);
        });
    }

When I run this function in my LoginForm.js it gives the error stated in the title. I don't know how I could check if it checking for the correct email or not so I am a bit stuck here.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The signInWithEmailAndPassword() takes 3 parameters - auth instance, email and password. But you are passing only the first one. Try refactoring the code as shown below:

function loginWithEmailHandler(email, password) {
  signInWithEmailAndPassword(auth, email, password)
    .then((result) => {
      const user = result.user;
      console.log(user.email, user.displayName);
      navigate("/");
    })
    .catch((error) => {
      const errorCode = error.code;
      const errorMessage = error.message;
      setMode("INCORRECT");
      console.log(errorCode, errorMessage);
    });
}

Make sure you pass the email and password entered by the user in that function:

// While calling the function
loginWithEmailHandler('user@domain.tld', 'userPassword');

You can read more in the documentation.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!