[英]How to add Forgot/Reset password link in #Firebase
I am using #AngularFire2 in my project. 我在我的项目中使用#AngularFire2。 I want to add a Reset / Forgot password link in my login view.
我想在我的登录视图中添加一个重置/忘记密码链接。
Any ideas how this is done? 任何想法如何做到这一点?
I want to #AskFirebase 我想#AskFirebase
Just implement this two methods: 只需实现这两种方法:
Make a request, and Firebase will send a email with the code 发出请求,Firebase将发送包含以下代码的电子邮件
requestPasswordReset(email: string) : Promise<any> {
return this.afAuth.auth.sendPasswordResetEmail(email);
}
Then you need to get this code with a new password from user 然后,您需要使用用户的新密码获取此代码
confirmNewPassword(code: string, password: string) : Promise<any> {
return this.afAuth.auth.confirmPasswordReset(code, password);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.