Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

627
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda