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