A self-contained cookie stays valid until it expires, so you add a server-side check. CookieAuthenticationEvents.OnValidatePrincipal runs on every authenticated request and is where custom checks go: look up the user (cached) and call context.RejectPrincipal() plus SignOutAsync if they are disabled or their session was revoked. ASP.NET Core Identity's SecurityStampValidator plugs into that event: every ValidationInterval (30 minutes by default; lower it for sensitive apps) it compares the cookie's security stamp with the database and rejects the cookie if the stamp changed. Identity changes the stamp on password, MFA and email changes; call UpdateSecurityStampAsync when an admin disables a user. For truly immediate revocation, set CookieAuthenticationOptions.SessionStore to an ITicketStore backed by a distributed cache: the cookie then holds only a session key, and deleting the server-side entry ends the session on the next request.
Checks they understand revocation of bearer credentials
Last updated 23 Nov 2026.