'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);
          });```


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source