title: My FireBase login program is not working for my school project
body: <p>I followed an online video tutorial on how to make a login system with fire base and Java script. I have copied it work for word but it does not work. I should be able to hit sign up and an alert should appear but non of the onclick functions seem to work. Help would be appreciated. I have looked in the console on inspect element as well but I cant seem to rectify the errors they are putting forward</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
      &lt;meta name=&quot;    viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  
  &lt;script src=&quot;https://www.gstatic.com/firebasejs/9.0.1/firebase-app.js&quot;;&gt;&lt;/script&gt;
  &lt;script src=&quot;https://www.gstatic.com/firebasejs/9.0.1/firebase-app.js&quot;;&gt;&lt;/script&gt;
  &lt;script src=&quot;form.js&quot;&gt;&lt;/script&gt;
      &lt;title&gt;Login System&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class=&quot;formContainer&quot;&gt;
      &lt;h1&gt;Enter Credentials Here:&lt;/h1&gt;
      &lt;input type=&quot;email&quot; placeholder=&quot;email here&quot; id=&quot;email&quot;&gt;&lt;/input&gt;
      &lt;input type=&quot;password&quot; placeholder=&quot;password here&quot; id=&quot;password&quot;&gt;&lt;/input&gt;
      &lt;button onclick=&quot;signUp()&quot; id=&quot;signUp&quot;&gt;SignUp&lt;/button&gt;
      &lt;button onclick=&quot;signIn()&quot; id=&quot;signIp&quot;&gt;SignIn&lt;/button&gt;
      &lt;button onclick=&quot;signOut()&quot; id=&quot;signOut&quot;&gt;SignOut&lt;/button&gt;
  &lt;/div&gt;
  
  
      
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <pre><code>var firebaseConfig = {
      apiKey: &quot;AIzaSyAlbLt0YTa41lbutVo1-ic5nPV9Yri9-vE&quot;,
      authDomain: &quot;loginv2-b2f0e.firebaseapp.com&quot;,
      projectId: &quot;loginv2-b2f0e&quot;,
      storageBucket: &quot;loginv2-b2f0e.appspot.com&quot;,
      messagingSenderId: &quot;144798003676&quot;,
      appId: &quot;1:144798003676:web:257d3f649f532bb6d51f19&quot;,
      measurementId: &quot;G-X6QG246ZF6&quot;
    };
  
    const app = initializeApp(firebaseConfig);;
  
    const auth = firebase.auth();
  
     //signup function
     function signUp(){
      var email = document.getElementById(&quot;email&quot;);
      var password = document.getElementById(&quot;password&quot;);
  
      const promise = auth.createUserWithEmailAndPassword(email.value,password.value);
      //
      promise.catch(e=&gt;alert(e.message));
      alert(&quot;SignUp Successfully&quot;);
    }
    
    
    //signIN function
    function  signIn(){
      var email = document.getElementById(&quot;email&quot;);
      var password  = document.getElementById(&quot;password&quot;);
      const promise = auth.signInWithEmailAndPassword(email.value,password.value);
      promise.catch(e=&gt;alert(e.message));
      
    }
  
  
     //signOut
  
     function signOut(){
      auth.signOut();
      alert(&quot;SignOut Successfully from System&quot;);
    }
  
  
  
      //active user to homepage
      firebase.auth().onAuthStateChanged((user)=&gt;{
          if(user){
            var email = user.email;
            alert(&quot;Active user &quot;+email);
      
          }else{
            alert(&quot;No Active user Found&quot;)
          }
        })
  </code></pre>