Signing out the user sessions from all the browsers

Darwai, Nikhil 1 Reputation point
2022-09-19T09:32:51.417+00:00

A user has logged into the application with the same username (email address) but on different browsers (ex. Chrome, Firefox). Now, the user changes the password on browser 1 and is logged out from browser 1 after the operation. But as its session is still active on browser 2, the user does not get signed out on any action resulting in a security vulnerability.
Now the requirement is to sign out the user's sessions from all the browsers if the user changes the password from one of the browsers. I am referring to the below links for the solution and have made the mentioned changes, but it looks like I am missing some configurations as the solution is not working as intended.
https://stackoverflow.com/questions/35221022/logout-user-from-all-browser-when-password-is-changed
https://stackoverflow.com/questions/36151800/asp-net-mvc-identity-securitystamp-signout-everywhere
Did I miss something or there is no such an out-of-the-box solution and I will have to implement my own custom logic to achieve this?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,256 questions
Azure ISV (Independent Software Vendors) and Startups
Azure ISV (Independent Software Vendors) and Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.ISV (Independent Software Vendors) and Startups: A Microsoft program that helps customers adopt Microsoft Cloud solutions and drive user adoption.
111 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 25,556 Reputation points Microsoft Vendor
    2022-09-20T07:34:36.233+00:00

    Hi @Darwai, Nikhil ,
    You can try adding a guid parameter to the authentication parameter. At the same time, the guid is saved to the session table, and when logging in, a row is added to the table, and the guid is saved in the cookie. Use the user ID and GUID to check that user authentication is enabled. Log off by deleting rows with guid, or log off by deleting all rows with userID to close all sessions.
    Best regards,
    Lan Huang

    1 person found this answer helpful.
    0 comments No comments