[Bug] Routing rules not respected for /.auth suffix
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I'd like to enable only one auth provider and disable all others. For that I'm using this `staticwebapp.config.json`:
```json
{
"routes": [
{
"route": "/.auth/login/github",
"statusCode": 200
},
{
"route": "/.auth/login/*",
"statusCode": 404
}
]
}
```
This basically tell that the GitHub route is fine, while all other should return a 404.
This works perfectly locally using SWA CLI, but when deployed on SWA it's completely broken:
- `/.auth/login/github` just results in a blank page (only status 200 was returned...)
- Any other auth providers works as usual!
**Expected behavior**
GitHub auth provider works, and other providers returns a 404 error.
**Additional context**
Routes likes these (expection first, then using a wildcard to set a common rules for the rest a path) works with any other hosts like Netlify, Vercel, etc. The fact that it works as expected with the SWA CLI is also a good sign that `/.auth/` routes should be processed just like the rest.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.