Azure / Azure/static-web-apps

staticwebapp.config openIdIssuer from environment variable not working

Open
#589 5 comments 8 reactions 0 assignees View on GitHub
AuthN/Z enhancement
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

We're using a static web app with Azure AD auth (our own tenant) and the current set up looks like this:

` "auth": {

"registration": {
"openIdIssuer": "https://login.microsoftonline.com/xxxx-xxxxx-xxxx-xxx/v2.0",
"clientIdSettingName": "AAD_CLIENT_ID",
"clientSecretSettingName": "AAD_CLIENT_SECRET"

}
},`

Obviously the client id and secret are pulled from the config in the azure portal. My issue is we have test and production versions with different tenant/provider ids in the openIdIssuer string. When I try making this a config app setting e.g (AAD_ISSUER) my auth breaks.

Is there a reason this can't be an environment/app setting variable or am I doing something wrong?
Also is there a way to list the values of these variables?

Thanks

**To Reproduce**

Set the openIdIssuer URL in auth config to an environment variable/app setting

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.