0

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 ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Thibault
  • 446
  • 7
  • 17
  • Are you using AzureAD or some 3rd party auth provider like Google or Facebook? If you're logged in zu AzureAD, Google or Facebook on both machines, it's natural choice that you don't need reauthentication – Tseng May 13 '16 at 12:58
  • No I'm not using a 3rd party auth provider. – Thibault May 13 '16 at 13:10

1 Answers1

0

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

Community
  • 1
  • 1
Robert Pilcher
  • 376
  • 1
  • 10
  • The sessions are shared across different machines, I don't think this is normal. A is connected to the website in machine A, B shouldn't be login on the website automatically (as user A) when he goes to the website on machine B. This is a really weird issue and this is kinda hard to explain. – Thibault May 13 '16 at 12:15
  • Different browsers don't share cookies. – Leonardo Herrera May 13 '16 at 13:29
  • Thibault, how did you solve finally this problem ? I'm having the same issue. Thanks – Josep Dec 22 '20 at 21:35