How to resolve this problem?
firebase.User.prototype.getToken is deprecated.
Please use firebase.User.prototype.getIdToken instead.
Here's my code:
signinUser(email: string, password: string) {
firebase.auth().signInWithEmailAndPassword(email, password)
.then(
response => {
firebase.auth().currentUser.getToken()
.then(
(token: string) => this.token = token
)
}
)
.catch(
error => console.log(error)
);
}
You have to use
firebase.auth().currentUser.getIdToken().
New Firebase version had a lot of changes. you can check on the official documentation.
https://firebase.google.com/docs/auth/android/password-auth
Hope it helps!