title: Create custom error messages for Firebase Authentication
body: <p>I am programming an Ionic app and have decided to use Firebase to simplify authentication. I have set up the username and password login and it works fine. The way I have it currently set up, if there is an error during login (like misspelled password), then the error will be displayed in the logs. Now, this error isn't very pretty and not what I would like the end user to see. I have been trying to figure out how to create a custom error message for different events so the user will see, "Password is Incorrect" instead of "Error: The specified password is incorrect.". In that example, its not much different, but you get the point. </p>
  
  <p>Here is a sample of the login code:</p>
  
  <pre><code>$scope.login = function(username, password) {
      var fbAuth = $firebaseAuth(fb);
      fbAuth.$authWithPassword({
          email: username,
          password: password
      }).then(function(authData) {
          $location.path('/tab')
      }).catch(function(error) {
          console.error("ERROR: " + error);
      });
  }
  </code></pre>
  
  <p>There is an error code for each error, but I'm not sure how to harness that to create a custom error message based on the error.</p>
  
  <p><img src="https://i.stack.imgur.com/GuSm4.png" alt="Here&#39;s an example"></p>
  
  <p>Any ideas? Thanks!</p>