0
lalitChougule created
- ABP Framework version: v7.2.2
- UI Type: Angular
- Database System: EF Core PostgreSQL
- Tiered (for MVC) or Auth Server Separated (for Angular): no/yes
- Exception message and full stack trace: N.A
- Steps to reproduce the issue:
I have a requirement where I have create few users using SQL scripts. For these users I need to share URL via email to reset password.
I found this method as per my use case in AccountAppService
public virtual async Task ResetPasswordAsync(ResetPasswordDto input)
{
await IdentityOptions.SetAsync();
var user = await UserManager.GetByIdAsync(input.UserId);
(await UserManager.ResetPasswordAsync(user, input.ResetToken, input.Password)).CheckErrors();
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
{
Identity = IdentitySecurityLogIdentityConsts.Identity,
Action = IdentitySecurityLogActionConsts.ChangePassword
});
}
I need to know what do I pass into ResetToken ? And how to generate this Reset Token ?
1 Answer(s)
-
0
hi
var resetToken = await UserManager.GeneratePasswordResetTokenAsync(user);