我想生成重置密码链接以发送到用户的电子邮件,该电子邮件将打开ResetPassword页面。在此页面上,我将填写有关新密码的详细信息,然后确认密码。
怎么做到这一点?
您可以从ASP.NET Identity下载样本以进行密码恢复/重置。
使用电子邮件输入编写API并根据示例发送到电子邮件重置链接。
之后,您创建一个角度服务,通过电子邮件输入调用web api。
@Injectable()
export class UserService {
constructor(private http: HttpClient) {
}
resetpassword(email: string){
return this.http.get('/api/user/resetpassword?email=' + email)
.map(response => {
// handle logic here
});
}
}