title: Firebase authentication (is not a function, is not a constructor)
body: <p>I don't know what is wrong. I'm using Node.js and trying to log in using email/password and Google authentication. I have enabled all of them in Firebase console.</p>
  
  <p>npm Firebase version - 3.1.0</p>
  
  <p>part of code:</p>
  
  <pre><code>var firebase = require('firebase');
  
  var config = {
    apiKey: "AIzaSyAH27JhfgCQfGmoGTdv_VaGIaX4P-qAs_A",
    authDomain: "pgs-intern.firebaseapp.com",
    databaseURL: "https://pgs-intern.firebaseio.com",
    storageBucket: "pgs-intern.appspot.com",
  };
  
  firebase.initializeApp(config);
  
  app.post('/login', function(req, res) {
    var auth = firebase.auth();
  
    firebase.auth().signInWithEmailAndPassword(req.body.login, req.body.password).catch(function(error) {
      // Handle Errors here.
      var errorCode = error.code;
      var errorMessage = error.message;
      // ...
    });
  }
  </code></pre>
  
  <p>Error: firebase.auth(...).signInWithLoginAndPassword is not a function
  or
  Error: firebase.auth(...).GoogleAuthProviders is not a constructor when I write </p>
  
  <pre><code>firebase.auth().signInWithPopup(provider).then(function(result) {
    // This gives you a Google Access Token. You can use it to access the Google API.
    var token = result.credential.accessToken;
    // The signed-in user info.
    var user = result.user;
    // ...
  }).catch(function(error) {
    // Handle Errors here.
    var errorCode = error.code;
    var errorMessage = error.message;
    // The email of the user's account used.
    var email = error.email;
    // The firebase.auth.AuthCredential type that was used.
    var credential = error.credential;
    // ...
  });
  </code></pre>
  
  <p>I just did exactly what is in documentation.</p>