Although the workaround suggested by Patrickmcd may work, it is not the most optimal solution. Depending on importing the firebase object to ensure the correct type on the Error Object goes against the purpose of the Angular Fire Module. It also unnecessarily increases the size of your application.
Please refer to the bug report at the following link: https://github.com/angular/angularfire2/issues/666
This issue is expected to be resolved in beta 7.
My workaround using Bracket Notation and String Literals eliminates the need to import the Firebase library.
Below is an example:
this.af.auth.login({
email: this.userEmail,
password: this.userPassword
}).catch(error => {
// Retrieve the firebase Error Code as documented here: https://firebase.google.com/docs/reference/js/firebase.auth.Error
console.log(error['code']);
// Get the firebase message associated with the Error Code
console.log(error['message']);
// Display failed login validation
this.loginFailed = true;
});
I hope this information proves useful!