通过 Firebase SDK 节点生成重置密码电子邮件时出错
Error with generating reset password email via Firebase SDK Node
目前我正在尝试为忘记密码的个人实施重置 Link。我不断收到一条错误消息,指出未定义 sendCustomPasswordResetEmail。我是 Firebase SDK 的新手,所以非常感谢任何建议。这是我的功能:
exports.resetPassword = (req, res) => {
const userEmail = req.body.email
admin
.auth()
.generatePasswordResetLink(userEmail)
.then(link => {
// Construct password reset email template, embed the link and send
// using custom SMTP server.
return sendCustomPasswordResetEmail(userEmail, link)
})
.catch(error => {
console.log(error)
})
}
您需要发送自定义电子邮件吗?否则,您可以充当客户端并按照 docs for web.
中所述发送普通密码重置电子邮件
目前我正在尝试为忘记密码的个人实施重置 Link。我不断收到一条错误消息,指出未定义 sendCustomPasswordResetEmail。我是 Firebase SDK 的新手,所以非常感谢任何建议。这是我的功能:
exports.resetPassword = (req, res) => {
const userEmail = req.body.email
admin
.auth()
.generatePasswordResetLink(userEmail)
.then(link => {
// Construct password reset email template, embed the link and send
// using custom SMTP server.
return sendCustomPasswordResetEmail(userEmail, link)
})
.catch(error => {
console.log(error)
})
}
您需要发送自定义电子邮件吗?否则,您可以充当客户端并按照 docs for web.
中所述发送普通密码重置电子邮件