Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
330 stars 57 forks source link

Switching on Enterprise Edge breaks Azure AD B2C auth #704

Open danbasszeti opened 2 years ago

danbasszeti commented 2 years ago

Describe the bug

When an existing Static Web App using Azure AD B2C for its auth provider and a custom domain has Enterprise Edge switched on, it attempts to redirect the user to the wrong address - wonderful-pebble-blah.origin.staticwebapps etc. This flags an error with Azure AD B2C for not being in the allowed list or redirect URI's - when added to that list the redirect simply sits there and does nothing.

To Reproduce Steps to reproduce the behavior:

  1. Set up a static web app with Custom Domain and Azure AD B2C as a custom auth provider
  2. Click on Enterprise Edge
  3. Attempt to login using the /login route
  4. Shows error about redirect URI not being allowed

Expected behavior Azure AD B2C login to continue to work using the custom domain registered with the static web app when Enterprise Edge is switched on Screenshots image

Device info (if applicable): Windows Chrome Latest

Additional context I switched off the Enterprise Edge feature and the login worked again after ten minutes. It may well also be that this isn't a bug as such, but that I just need to add some more DNS records or something. In which case I guess its more of a documentation thing!

danbasszeti commented 2 years ago

I attached my staticwebapp.config.json but it seemed to remove it. Please let me know if you need it, but its basically just copied from the documentation on how to set up Azure AD B2C as a provider.

mkarmark commented 2 years ago

Hi, we have identified the issue on our end and are actively rolling out a fix for this. This fix should be deployed globally by early next week, and I'll update this thread when it is.

mkarmark commented 2 years ago

Sorry for forgetting to update this thread, but the fix is globally deployed, do you mind retrying?