Skip to content

Commit 9219cd6

Browse files
authored
Updates
1 parent 7fcec45 commit 9219cd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aspnetcore/blazor/progressive-web-app/push-notifications.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ Sending a notification involves performing some complex cryptographic operations
255255

256256
The `SendNotificationAsync` method dispatches order notifications using the captured subscription. The following code makes uses of `WebPush` APIs for dispatching the notification. The payload of the notification is JSON serialized and includes a message and a URL. The message is displayed to the user, and the URL allows the user to reach the pizza order associated with the notification. Additional parameters can be serialized as required for other notification scenarios.
257257

258-
[!INCLUDE[](~/blazor/security/includes/secure-authentication-flows.md)]
258+
> [!CAUTION]
259+
> In the following example, we recommend using a secure approach for supplying the private key. When working locally in the Development environment, a private key can be provided to the app using the [Secret Manager](xref:security/app-secrets#secret-manager) tool. In Development, Staging, and Production environments, [Azure Key Vault](/azure/key-vault/) with [Azure Managed Identities](/entra/identity/managed-identities-azure-resources/overview) can be used, noting in passing that to obtain a certificate's private key from a key vault that the certificate must have an exportable private key.
259260
260261
```csharp
261262
private static async Task SendNotificationAsync(Order order,

0 commit comments

Comments
 (0)