在我的Firebase网站上,我调用以下代码发送重置电子邮件:
firebase.auth().sendPasswordResetEmail(this.state.email).then(function() {
this.setState({ error: "Password reset email sent"});
}.bind(this)).catch(function(error) {
this.setState({ error: error.message});
}.bind(this))
我收到了以下电子邮件:
Hello,
Follow this link to reset your myappname password for your xxxxxx@xxxx.xxx
https://myappname.firebaseapp.com/__/auth/action?mode=resetPassword&oobCode=5BQI4oEXwbDg_3RD8mkAA73Nh0KIxoSbutkkigGCBD0AAAFftKBr2A&apiKey=AIzaSyBrBHyYC7QCSnwpHkKuWkAImvKcnjdCKZs
If you didn’t ask to reset your password, you can ignore this email.
重置链接将我带到标准密码更改页面并要求我输入新密码。进入后,它说
Password changed
You can now sign in with your new password
但实际上,当我使用新密码登录时,它会显示invalid password
。