I have started on a blazor-webassembly PWA project (.net 5.0-rc1), hosted on asp.net core, and is working Authentication against 3rd party services.
This login flow is based on asp.net core identity.
The flow is as follows:
When developing locally, the above flow works without any issues.
However when deploying to my webhotel, step 2 is redirected to the Blazor application, rather than the controller on the server, causing a "Not found" page.
As the server is hosting the application they share the same base url.
I have tried both a regular link <a href="..."> and navigate with Navigationmanager.NagivateTo(url, forLoad: true);
When shown the "Not Found" page, pressing F5 will result in the same page. However pressing Ctrl+F5 causes the server endpoint to be hit, and the rest of the flow works as intented.
The issue were the serviceworker, catching all requests and sending them to index.html. The answer to this issue can be found in the following: URL Rewrite exceptions for Blazor WebAssembly Hosted deployment