0

We've got a setup of:

  • Linux container web app (single instance)
  • Nodejs server with passportjs + openid
  • External Authentication (OpenID) provider.

If the frontend is contacted directly (through .azurewebsites.net) the authentication works as expected and sessions are working.

Then we've configured a new domain, which points to application gateway and gets redirected to the webapp. Now the UI itself loads, however, after the login, the application "forgets" that the user is logged in.

Looking at the response cookies the appSession cookies disappear right after the first login redirect.

What can be done to fix this problem? I've seen that cookie based affinity can be enabled, but to my understand that would make sense if I have multiple instances of the UI ?

August
  • 101

1 Answers1

0

The most probable cause is that you must enable the Cookie based affinity

  1. Log on to the Azure portal.
  2. In the left navigation pane, click All resources. Click the application gateway name in the All resources blade. If the subscription that you selected already has several resources in it, you can enter the application gateway name in the Filter by name… box to easily access the application gateway.
  3. Select HTTP settings tab under SETTINGS.
  4. Select the HTTP setting, and on the Add HTTP setting page, check if Cookie based affinity is enabled. enter image description here

More Troubleshoot Azure Application Gateway session affinity issues

Hope this helps!

SoySolisCarlos
  • 165
  • 1
  • 3