I am working on an ASP.NET MVC website, it's an e-commerce website. I am using ASP.NET Identity.
I have added a new functionality to block users when they create spam advertisements. I have added a IsBlocked
flag to user
table and if the flag is set, that user can no longer login to website.
But if the user is already logged in and have a valid session/cookie, then they can continue using the website until they logout or their session is expired. Is it possible to invalidate their existing session (if any) when they are blocked?