0
我有更改密码的问题,我有方法来改变:与ASP .NET安全更改密码
public async Task ChangeMyPasswordAsync(string password, string oldPassword)
{
var identity = await UserManager.FindAsync((Thread.CurrentPrincipal.Identity as ClaimsIdentity).Name, oldPassword);
if (identity == null)
throw new AuthenticationException();
CheckError(await UserManager.RemovePasswordAsync(identity.Id));
CheckError(await UserManager.AddPasswordAsync(identity.Id, password));
}
如果显示表中BBDD密码的哈希被改变,但我当我试图登录该应用程序我看这样行:
var user = await userManager.FindByNameAsync(context.UserName);
在用户变量有旧密码的哈希值,但是当我(再次Shift + F5和F5)重置该应用程序无法使用新密码并没有旧...
有什么想法吗?
谢谢!
在我的情况下你的解决方案是无效的,感谢您的帮助 – David 2014-10-06 09:12:17