ASP.NET Core identity shared across browser

空扰寡人 提交于 2019-12-13 06:29:31

问题


When I'm deploying an ASP.NET Core web application to Azure, I have an issue with the session : they are shared across browsers.

Explanation : I'm going to my deployed site, I log in with my email/password then I'm logged in. If I open the website in an other browser on the same machine or on an other machine, I'm now connected with the credentials I used in the first browser.

I deployed the default template from Visual Studio without any changes. Is there something to do to resolve this issue or am I missing something ?


回答1:


Pretty sure this functionality is by design... and it makes a lot of sense - you wouldn't want to have to re-authenticate if you opened another tab to view a document in your on-line banking would you?

If you need to logon without sharing the cookies with existing browser (it will be the cookies that are holding the reference to the session that ensures the server knows who you are) you need to start a new session. For Internet Explorer this is simply File >> New Session.

For Chrome it is a little more complicated but explained here... Separate session for each window



来源:https://stackoverflow.com/questions/37209605/asp-net-core-identity-shared-across-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!