title: Firebase: During testing I get "undefined is not a function"
body: <p>This is my used code:</p>
  
  <pre><code>var cred = firebase.auth().EmailAuthProvider($scope.data.mail, $scope.data.pwd);
  
  firebase.auth().signInWithCredential(cred)
                                          .then(function()
  </code></pre>
  
  <p>During testing, I get the following error:</p>
  
  <blockquote>
    <p>TypeError: undefined is not a function (evaluating
    'firebase.auth().EmailAuthProvider($scope.data.mail,
    $scope.data.pwd)')</p>
  </blockquote>
  
  <p>So what's wrong with my code? How can I fix this problem?</p>