简体   繁体   中英

ASP.NET CORE. Reset all authentications

I need to have all authentications reset after changing the user password. I tried to change security stamp, but it is don't reset authentications:

await _userManager.UpdateSecurityStampAsync(User);

I am using Asp Net Core Identity.

We do this on logout:

await HttpContext.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);

But when users change their password, we don't need to log out only clear down the session or other persisted user context info, or re-create that info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM