Reset password is a part of forgot password functionality in ASP.Net identity. When a user forgets his/her password and want to change his password without using old password, then we use reset password functionality.
In Asp.Net identity, we have methods to remove user`s old password and add users new desired password. Here is the sample code for the same
UserManager.RemovePassword(user.Id);
UserManager.AddPassword(user.Id, newPassword);
Here we first use Remove password to remove the user`s password and then we call AddPassword to add the new password for the user. Both these methods as contained in UserManager object of ApplicationUserManager class. ApplicationUserManager class contains all the necessary methods related to user account
0 Comment(s)