Replies: 1 comment
-
I found the problem and will post here in case anyone else is having the same issue. Its was all down to me making a silly comment in the appsettings.json, as json doens't support comments the file was incorrect,
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm hosting Blazor WASM spa on Azure Static Web Apps, the api/* & .auth/* routes are special routes that are picked up and handled by Asure Static Web Apps. My Blazor app handles these., how can I exclude these from being handled by Blazor?
TLDR;
Demo app hosted here: https://orange-grass-0a3e6ff10.5.azurestaticapps.net/
There are 3 login links on the site for testing, they all link or redirect to: https://orange-grass-0a3e6ff10.5.azurestaticapps.net/.auth/login/aad
When the "Log in 2" is clicked for example
<a href="/.auth/login/aad">Log in 2</a>
(Annoyingly) Blazor catches this route and returns "Not Found", "Sorry, there's nothing at this address." this comes from App.razor
The url of the browser is now pointing to: https://orange-grass-0a3e6ff10.5.azurestaticapps.net/.auth/login/aad
CTRL+F5 to do a refresh and url is picked up by Azure Static Web Apps rather than Blazor now and redirects to the correct login flow.
How can I avoid the Blazor route processing on api/* & .auth/* so these fall back to processing by Azure Static Web Apps?
P.S. I have it work once without a CTRL+F5 refresh but never again....
Beta Was this translation helpful? Give feedback.
All reactions