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

317
Vistas
Firebase Auth- Not adding users after signup

I am trying to add users with email and password function in Firebase but the information is not added once the sign up button is clicked. I have inserted the block of code I've written to perform this action. I'm not sure what I'm missing.The user information does not appear in the console and there is no error message. All other data that is entered works, the authentication part is the only thing that is not working correctly.

  
  // signing new users up
    const signupForm = document.querySelector('.signup');
    signupForm.addEventListener('submit', (e) => {
      e.preventDefault();
  
      const email = signupForm.email.value;
      const password = signupForm.password.value;
  
      createUserWithEmailAndPassword(auth, email, password)
        .then((cred) => {
          // console.log('user created:', cred.user);
          signupForm.reset();
        })
        .catch((err) => {
          // console.log(err.message);
        });
  
      // logging in and out
      const logoutButton = document.querySelector('.logout');
      logoutButton.addEventListener('click', () => {
        signOut(auth)
          .then(() => {
            alert('user signed out');
          })
          .catch((err) => {
            console.log(err.message);
          });
      });
  
      const loginForm = document.querySelector('.login');
      loginForm.addEventListener('submit', (e) => {
        e.preventDefault();
  
        const email = loginForm.email.value;
        const password = loginForm.password.value;
  
        signInWithEmailAndPassword(auth, email, password)
          .then((cred) => {
            console.log('user logged in:', cred.user);
            loginForm.reset();
          })
          .catch((err) => {
            console.log(err.message);
          });```
about 4 years ago · Juan Pablo Isaza
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