I am wondering if there is a way to reset password with UserManager
of ASP.NET MVC 5
I tried this with user that already has a password but no success. Any clue?
IdentityResult result = UserManager.AddPassword(forgotPasswordEvent.UserId.ToString(), model.ConfirmPassword);
if (result.Succeeded)
{
//
}
else
{
AddErrors(result);
}
try using the user store:
The IdentityMembership is cool, but still lacking some implementation
UPDATE
Identity 2.0 is here now and has a lot more features
There are extension to change the password in the namespace Microsoft.AspNet.Identity.
https://msdn.microsoft.com/en-us/library/dn497466(v=vs.108).aspx
I suppose this is newer but there is such an API in Identity 2.0:
model.Code is generated the following way, and you should send this as a link in a email to make sure the user who is claiming to want to change the password is that one that owns the email address:
It is here ASP.NET Identity reset password
I added this to my UserManager class :