Azure / Azure/static-web-apps

Allow static web app to reference custom app settings

Open
#706 5 comments 18 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

### Scenario

When we have different configuration setting values for apps in different environments, it would be a lot more convenient to create app settings just as we could with app services (web apps / function apps).

An example we encountered recently is during our custom OIDC authentication setup for a static web app. Per [this section in doc](https://docs.microsoft.com/en-us/azure/static-web-apps/authentication-custom?tabs=openid-connect#configure-a-custom-identity-provider), **MY_PROVIDER_CLIENT_ID** and **MY_PROVIDER_CLIENT_SECRET** are the only settings that can be used as app settings (apart from some app settings used by Managed Functions). Thus, our attempt below did not work as expected:

When we tried to have the wellKnownOpenIdConfiguration property reference an app setting named CONFIG_URL, the app seemed to simply take the string value "CONFIG_URL" as the URL instead of referencing the actual URL value in the app setting.

**In staticwebapp.config.json**:
```json
"openIdConnectConfiguration": {
...
"wellKnownOpenIdConfiguration": "CONFIG_URL",
...
}
```
**In Application Settings**:
```
CONFIG_URL https:///.well-known/openid-configuration
```

### Feature Request

We'd like to be able to set and reference app settings the same way we could in app services. In the above scenario, ideally we could reference the app setting to retrieve different URLs for apps in different environments, instead of hard-coding them with extra setups.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.