Rask.WebPush
0.15.2-alpha.0.45
See the version list below for details.
dotnet add package Rask.WebPush --version 0.15.2-alpha.0.45
NuGet\Install-Package Rask.WebPush -Version 0.15.2-alpha.0.45
<PackageReference Include="Rask.WebPush" Version="0.15.2-alpha.0.45" />
<PackageVersion Include="Rask.WebPush" Version="0.15.2-alpha.0.45" />
<PackageReference Include="Rask.WebPush" />
paket add Rask.WebPush --version 0.15.2-alpha.0.45
#r "nuget: Rask.WebPush, 0.15.2-alpha.0.45"
#:package Rask.WebPush@0.15.2-alpha.0.45
#addin nuget:?package=Rask.WebPush&version=0.15.2-alpha.0.45&prerelease
#tool nuget:?package=Rask.WebPush&version=0.15.2-alpha.0.45&prerelease
Rask.WebPush
Server-side Web Push sender. Signs VAPID and encrypts
(RFC 8291, aes128gcm) push messages, then POSTs them to
a browser PushSubscription endpoint. It is the send half that pairs with Rask.Wasm's
IWebPush client — but it is transport-neutral: usable from a Rask Server app or any ASP.NET
backend behind a WASM PWA.
No external dependencies beyond Microsoft.Extensions.* — all crypto is in-box
System.Security.Cryptography.
Install
dotnet add package Rask.WebPush
Use
builder.Services.AddRaskWebPush(o =>
{
o.VapidKeys = VapidKeys.Generate(); // generate once, then load from config/secrets
o.Subject = "mailto:admin@example.com"; // a contact the push service can reach
});
// ... inject IWebPushSender, then given a PushSubscription the browser sent you:
var result = await sender.SendAsync(
subscription,
new WebPushMessage { Title = "Hello", Body = "from the server" },
ct);
// Inspect the result to prune dead subscriptions:
if (result.ShouldDelete) await store.RemoveAsync(subscription);
Notes
- Standards-based — VAPID (RFC 8292) auth + RFC 8291
aes128gcmpayload encryption; interops with any standard browser Push service (FCM, Mozilla, WNS). - Zero external deps — ECDH, HKDF and AES-GCM come from
System.Security.Cryptography. - Generate a VAPID key pair once with
VapidKeys.Generate()and keep the private key server-side; hand the public key to the browser subscription. SendAsyncreturns aWebPushResultwhoseShouldDelete/ShouldRetryflags map the push service's response to the action to take on the subscription.
Full documentation: https://github.com/pal-tamas/rask/blob/main/docs/pwa.md
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.20.1-alpha.0.43 | 5 | 8/12/2026 |
| 0.20.1-alpha.0.42 | 31 | 8/12/2026 |
| 0.20.1-alpha.0.41 | 31 | 8/12/2026 |
| 0.20.1-alpha.0.40 | 28 | 8/12/2026 |
| 0.20.1-alpha.0.38 | 30 | 8/12/2026 |
| 0.20.1-alpha.0.36 | 49 | 8/10/2026 |
| 0.20.1-alpha.0.18 | 44 | 8/8/2026 |
| 0.20.1-alpha.0.17 | 45 | 8/8/2026 |
| 0.20.1-alpha.0.16 | 47 | 8/8/2026 |
| 0.20.1-alpha.0.15 | 48 | 8/7/2026 |
| 0.20.1-alpha.0.14 | 58 | 8/7/2026 |
| 0.20.1-alpha.0.13 | 46 | 8/7/2026 |
| 0.20.1-alpha.0.12 | 45 | 8/7/2026 |
| 0.20.1-alpha.0.11 | 49 | 8/7/2026 |
| 0.20.1-alpha.0.9 | 43 | 8/7/2026 |
| 0.20.1-alpha.0.8 | 51 | 8/7/2026 |
| 0.20.1-alpha.0.7 | 48 | 8/7/2026 |
| 0.20.1-alpha.0.5 | 47 | 8/7/2026 |
| 0.20.0 | 66 | 8/6/2026 |
| 0.15.2-alpha.0.45 | 52 | 7/13/2026 |