Allow Multiple Users per Browser

5

For example, Google allows you to keep n Google accounts stored in your browser .

In the case of Google , it creates a control variable called authuser which receives a inteiro , it passes this variable in the url, either through a route or in the queryString, and uses it to identify which login the user is using on that tab.

I would like to do something similar with ASP.NET Identity

    
asked by anonymous 27.12.2016 / 13:20

1 answer

0

Maybe I have frameworks that do what you want, I never needed so I did not search, but I think now of a simple way to solve this, and it works regardless of the version and whether it is a legacy system or not. Just manage the cookie. For example, in Asp.Net, normally the default cookie name is ".ASPXAUTH", when your system adds a new user, you copy the value of the ".ASPXAUTH" cookie to a new cookie such as "User1" and removes the authentication cookie and redirects to the login page. After login, whenever you change users, simply change the values of cookies from "User1" and ".ASPXAUTH". It's simple, but I think it works.

    
26.05.2017 / 17:12