title: How to fix: Cannot read property 'GoogleAuthProvider' of undefined
body: <p>I'm using firebase for authentication purposes but i'm having some troubles setting it up</p>
  
  <p>I already tried everything the tutorial said but to no success</p>
  
  <p><a href="https://www.youtube.com/watch?v=hb85pYZSJaI" rel="nofollow noreferrer">https://www.youtube.com/watch?v=hb85pYZSJaI</a></p>
  
  <pre><code>  &lt;body&gt;
      &lt;div id="firebaseui-auth-container"&gt;&lt;/div&gt;
    &lt;/body&gt;
  
    &lt;!-- firebase --&gt;
    &lt;script src="https://www.gstatic.com/firebasejs/6.2.4/firebase-app.js"&gt;&lt;/script&gt;
  
    &lt;!-- firebaseUI --&gt;
    &lt;script src="https://cdn.firebase.com/libs/firebaseui/4.0.0/firebaseui.js"&gt;&lt;/script&gt;
    &lt;link
      type="text/css"
      rel="stylesheet"
      href="https://cdn.firebase.com/libs/firebaseui/4.0.0/firebaseui.css"
    /&gt;
  
    &lt;script&gt;
      // Your web app's Firebase configuration
      var firebaseConfig = {
        apiKey: "AIzaSyBtnE9XZR_tYckh5dYlwKbFdG3Nqs7y6JI",
        authDomain: "example123-6edfb.firebaseapp.com",
        databaseURL: "https://example123-6edfb.firebaseio.com",
        projectId: "example123-6edfb",
        storageBucket: "",
        messagingSenderId: "113254883849",
        appId: "1:113254883849:web:2e6706cd75b6bbd9"
      };
  
      // Initialize Firebase
      firebase.initializeApp(firebaseConfig);
  
      // FirebaseUI config.
      var uiConfig = {
        signInSuccessUrl: "algo.html",
        signInOptions: [
          // Leave the lines as is for the providers you want to offer your users.
          firebase.auth.GoogleAuthProvider.PROVIDER_ID,
          firebase.auth.FacebookAuthProvider.PROVIDER_ID,
          firebase.auth.TwitterAuthProvider.PROVIDER_ID,
          firebase.auth.GithubAuthProvider.PROVIDER_ID,
          firebase.auth.EmailAuthProvider.PROVIDER_ID,
          firebase.auth.PhoneAuthProvider.PROVIDER_ID
        ],
        // tosUrl and privacyPolicyUrl accept either url string or a callback
        // function.
        // Terms of service url/callback.
        tosUrl: "&lt;your-tos-url&gt;",
        // Privacy policy url/callback.
        privacyPolicyUrl: function() {
          window.location.assign("&lt;your-privacy-policy-url&gt;");
        }
      };
  
      // Initialize the FirebaseUI Widget using Firebase.
      var ui = new firebaseui.auth.AuthUI(firebase.auth());
      // The start method will wait until the DOM is loaded.
      ui.start("#firebaseui-auth-container", uiConfig);
    &lt;/script&gt;
  </code></pre>
  
  <p>but i'm getting this error when i access the page</p>
  
  <p>(index):49 Uncaught TypeError: Cannot read property 'GoogleAuthProvider' of undefined
      at (index):49</p>
  
  <p>Any Ideas?</p>