Static Web App with Blazor and AUTH config in staticwebapp.config.json without effect on SWA CLI
See original GitHub issueDescribe the bug
Thanks for all the work on this very nice tool! I like it a lot. But i experience a bug i guess.
By starting SWA using this command: swa start https://localhost:5001 --api Api --swa-config-location ./Client/wwwroot
, and f or sure previously startet dotnet run watch
to have the server runniing.
My expactation would be: AUTH can be simulated.
To Reproduce
-
use default Blazor SWA Demo repo
-
configure route in staticwebapp.config.json and place it in ./Client/wwwroot like so: `{
“navigationFallback”: { “rewrite”: “index.html”, “exclude”: [“/_framework/", "/css/”, “*.{js,map,css,png,ico}”] },
“routes”: [{ "route":"/login", "redirect":"/.auth/login/aad" }, { "route":"/fetchdata", "allowedRoles":["authenticated"] }, { "route": "/.auth/login/twitter", "statusCode": "404" }
] }`
-
start
dotnet run watch
on the client path -
start SWA CLI using this command:
swa start https://localhost:5001 --api Api --swa-config-location ./Client/wwwroot
-
Navigate to “Fetch Data”
Expected behavior
- Expected result: page cannot be loaded, cause u r not loged in. but it loads.
Desktop (please complete the following information):
- Windows 10
- Chrome
- CLI 0.4.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
Tested the changes in #208 and it looks like this will be resolved by that PR! 🎉
I updated the note at the top of the page to read: