在带有打字稿的离子2上,我使用此firebase函数来重置用户密码。 该功能运行良好,但控制台显示错误:
提供的参数与行的调用目标的任何签名都不匹配:“this.ref.resetPassword({email:credentials.email})”
有人可以帮我解决吗?
感谢。
retrievePassword(credentials, _event) {
_event.preventDefault();
this.ref.resetPassword({
email: credentials.email
// password: credentials.password
}).then((error) => {
if (error) {
switch (error.code) {
case "INVALID_USER":
console.log("The specified user account does not exist.");
break;
default:
console.log("Error resetting password:", error);
}
} else {
console.log("Password reset and email was sent successfully!");
this.presentToast();
}
});