Custom authentication routes fail with 404 error
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
I'm stuck for a while trying to set up a custom OpenID Connect identity provider.
The hosting plan (SKU) is "Standard". Ironically, according to the configuration and managment diagnostic page, it seems that the whole config file is taken into account (routes, global headers).
Below the `starticwebapp.config.json` I use (I replaced the provider name by the alias ``). I tried to deploy with both aliases (`CLIENT_ID`) with Azure DevOps pipelines and actual values with `swa deploy` command (SWA CLI 2.0.6).
```lang-json
{
"platform": {
"apiRuntime": "node:20"
},
"globalHeaders": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, OPTIONS"
},
"routes": [
{
"route": "/login",
"rewrite": "/.auth/login/"
},
{
"route": "/logout",
"rewrite": "/.auth/logout"
}
],
"auth": {
"identityProviders": {
"customOpenIdConnectProviders": {
"": {
"registration": {
"clientIdSettingName": "CLIENT_ID",
"clientCredential": {
"clientSecretSettingName": "CLIENT_SECRET"
},
"openIdConnectConfiguration": {
"wellKnownOpenIdConfiguration": "WELL_KNOWN_OPENID_CONFIGURATION"
}
},
"login": {
"nameClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
"scopes": ["openid", "profile", "email"]
}
}
}
}
}
}
```
I wonder if the allowed headers are required.
Did I miss something?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.