You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Custom authentication also allows you to [configure custom providers](./authentication-custom.md?tabs=openid-connect#configure-a-custom-identity-provider) that support [OpenID Connect](https://openid.net/connect/). This configuration allows the registration of multiple external providers.
17
17
18
-
- Using any custom registrations disables all pre-configured providers.
18
+
- Using any custom registrations disables all preconfigured providers.
19
19
20
20
> [!NOTE]
21
21
> Custom authentication is only available in the Azure Static Web Apps Standard plan.
Custom identity providers are configured in the `auth` section of the [configuration file](configuration.md).
26
26
27
-
To avoid putting secrets in source control, the configuration looks into [application settings](application-settings.yml#configure-application-settings) for a matching name in the configuration file. You may also choose to store your secrets in [Azure Key Vault](./key-vault-secrets.md).
27
+
To avoid putting secrets in source control, the configuration looks into [application settings](application-settings.yml#configure-application-settings) for a matching name in the configuration file. You might also choose to store your secrets in [Azure Key Vault](./key-vault-secrets.md).
28
28
29
29
# [Microsoft Entra ID](#tab/aad)
30
30
@@ -91,6 +91,50 @@ To configure which accounts can sign in, see [Modify the accounts supported by a
91
91
> [!NOTE]
92
92
> While the configuration section for Microsoft Entra ID is `azureActiveDirectory`, the platform aliases this to `aad` in the URL's for login, logout and purging user information. Refer to the [authentication and authorization](authentication-authorization.yml) section for more information.
93
93
94
+
### Custom certificate
95
+
96
+
Use the following steps to add a custom certificate to your Microsoft Entra ID app registration.
97
+
98
+
1. If it isn't already, upload your certificate to a Microsoft Key Vault.
99
+
100
+
1. Add a managed identity on your Static Web App.
101
+
102
+
For user assigned managed identities, set `keyVaultReferenceIdentity` property on your static site object to the `resourceId` of the user assigned managed identity.
103
+
104
+
Skip this step if your managed identity is system assigned.
105
+
106
+
1. Grant the managed identity the following access policies:
107
+
108
+
-*Secrets*: **Get/List**
109
+
-*Certificates*: **Get/List**
110
+
111
+
1. Update the auth config section of the `azureActiveDirectory` configuration section with a `clientSecretCertificateKeyVaultReference` value as shown in the following example:
Make sure to replace your values in for the placeholders surrounded by `<>`.
133
+
134
+
In the secret URI, specify the key vault name and certificate name. If you want to pin to a version, include the certificate version, otherwise omit the version to allow the runtime to select the newest version of the certificate.
135
+
136
+
Set `clientSecretCertificateThumbprint` equal to `*` to always pull the latest version of the certificates thumbprint.
137
+
94
138
# [Apple](#tab/apple)
95
139
96
140
To create the registration, begin by creating the following [application settings](application-settings.yml):
@@ -233,7 +277,7 @@ For more information on how to configure Twitter as an authentication provider,
233
277
234
278
# [OpenID Connect](#tab/openid-connect)
235
279
236
-
You can configure Azure Static Web Apps to use a custom authentication provider that adheres to the [OpenID Connect (OIDC) specification](https://openid.net/connect/). The following steps are required to use an custom OIDC provider.
280
+
You can configure Azure Static Web Apps to use a custom authentication provider that adheres to the [OpenID Connect (OIDC) specification](https://openid.net/connect/). The following steps are required to use a custom OIDC provider.
237
281
238
282
- One or more OIDC providers are allowed.
239
283
- Each provider must have a unique name in the configuration.
@@ -250,7 +294,7 @@ Once the application is registered with the identity provider, create the follow
250
294
|`MY_PROVIDER_CLIENT_ID`| The client ID generated by the authentication provider for your static web app. |
251
295
|`MY_PROVIDER_CLIENT_SECRET`| The client secret generated by the authentication provider's custom registration for your static web app. |
252
296
253
-
If you register additional providers, each one needs an associated client ID and client secret store in application settings.
297
+
If you register other providers, each one needs an associated client ID and client secret store in application settings.
254
298
255
299
> [!IMPORTANT]
256
300
> Application secrets are sensitive security credentials. Do not share this secret with anyone, distribute it within a client application, or check into source control.
@@ -290,7 +334,7 @@ Once you have the registration credentials, use the following steps to create a
290
334
291
335
- The provider name, `myProvider` in this example, is the unique identifier used by Azure Static Web Apps.
292
336
- Make sure to replace `<PROVIDER_ISSUER_URL>` with the path to the _Issuer URL_ of the provider.
293
-
- The `login` object allows you to provide values for: custom scopes, login parameters, or custom claims.
337
+
- The `login` object allows you to provide values for: custom scopes, log in parameters, or custom claims.
294
338
295
339
---
296
340
@@ -303,7 +347,7 @@ Identity providers require a redirect URL to complete the login or logout reques
If you are using Microsoft Entra ID, use `aad` as the value for the `<PROVIDER_NAME_IN_CONFIG>` placeholder.
350
+
If you're using Microsoft Entra ID, use `aad` as the value for the `<PROVIDER_NAME_IN_CONFIG>` placeholder.
307
351
308
352
> [!Note]
309
353
> These URLs are provided by Azure Static Web Apps to receive the response from the authentication provider, you don't need to create pages at these routes.
@@ -319,7 +363,7 @@ To use a custom identity provider, use the following URL patterns.
319
363
| User details |`/.auth/me`|
320
364
| Purge user details |`/.auth/purge/<PROVIDER_NAME_IN_CONFIG>`|
321
365
322
-
If you are using Microsoft Entra ID, use `aad` as the value for the `<PROVIDER_NAME_IN_CONFIG>` placeholder.
366
+
If you're using Microsoft Entra ID, use `aad` as the value for the `<PROVIDER_NAME_IN_CONFIG>` placeholder.
323
367
324
368
## Manage roles
325
369
@@ -350,7 +394,7 @@ Invitations are specific to individual authorization-providers, so consider the
350
394
| GitHub | username |
351
395
| Twitter | username |
352
396
353
-
Do the following steps to create an invitation.
397
+
Use the following steps to create an invitation.
354
398
355
399
1. Go to a Static Web Apps resource in the [Azure portal](https://portal.azure.com).
356
400
2. Under _Settings_, select **Role Management**.
@@ -391,7 +435,7 @@ When the user selects the link in the invitation, they're prompted to sign in wi
391
435
As you remove a user, keep in mind the following items:
392
436
393
437
- Removing a user invalidates their permissions.
394
-
- Worldwide propagation may take a few minutes.
438
+
- Worldwide propagation might take a few minutes.
395
439
- If the user is added back to the app, the [`userId` changes](user-information.md).
0 commit comments