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?

Azure | Azure ISV (Independent Software Vendor) and Startups
Developer technologies | ASP.NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 30,191 Reputation points Microsoft External Staff
    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.