Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

619
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda