-1
After configuring Angularfire and injecting Angularfireauth you can already use the methods. Without the need for this .auth
.
constructor(
private firebaseAuth: AngularFireAuth
) {
}
ngOnInit(): void {
}
async doLogin(user): Promise<void> {
await this.firebaseAuth.signInWithEmailAndPassword(user.email, user.password)
}catch(e) {
alert('Usuário e/ou senha incorreto(s)')
}
}
In your example it would be something like
...
login(user){
return this.firebaseAuth.signInWithEmailAndPassword(user.email, user.password);
}
...
Really... I removed the . auth and the application ran normally.
– Dionathan Martins de Passos