Rask.WebPush
0.23.1-alpha.0.64
See the version list below for details.
dotnet add package Rask.WebPush --version 0.23.1-alpha.0.64
NuGet\Install-Package Rask.WebPush -Version 0.23.1-alpha.0.64
<PackageReference Include="Rask.WebPush" Version="0.23.1-alpha.0.64" />
<PackageVersion Include="Rask.WebPush" Version="0.23.1-alpha.0.64" />
<PackageReference Include="Rask.WebPush" />
paket add Rask.WebPush --version 0.23.1-alpha.0.64
#r "nuget: Rask.WebPush, 0.23.1-alpha.0.64"
#:package Rask.WebPush@0.23.1-alpha.0.64
#addin nuget:?package=Rask.WebPush&version=0.23.1-alpha.0.64&prerelease
#tool nuget:?package=Rask.WebPush&version=0.23.1-alpha.0.64&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
The key pair and the contact come from the Rask:WebPush configuration section. A rask new app already
has a development pair in its (gitignored) appsettings.Development.json. Otherwise mint one with
VapidKeys.Generate() and keep it out of source — the private key signs every push you send:
// appsettings.Development.json — gitignored
{
"Rask": { "WebPush": { "VapidKeys": { "PublicKey": "…", "PrivateKey": "…" } } }
}
Deployed, both keys come from the environment instead: Rask__WebPush__VapidKeys__PublicKey and
Rask__WebPush__VapidKeys__PrivateKey.
// appsettings.json
{
"Rask": {
"WebPush": {
"Subject": "mailto:admin@example.com" // a contact the push service can reach
}
}
}
builder.Services.AddRaskWebPush(); // reads Rask:WebPush; a callback here would run after it and win
// ... inject IWebPush, then given a PushSubscription the browser sent you:
var result = await sender.Send(
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. Sendreturns 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. net11.0 is compatible. |
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Http (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
-
net11.0
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.Http (>= 10.0.12)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Rask.WebPush:
| Package | Downloads |
|---|---|
|
Rask.Server
The ASP.NET host for Rask, a full-stack .NET web framework, with every battery: database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator and query cache, accounts, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, SQLite snapshots and continuous backup. Renders Rask components with live updates over a WebSocket. RaskApp.Create(args).Run<App>() is the whole Program.cs; app.Configure(c => c.Jobs.Off()) is how an app does without one. Depends on Rask, the shared core. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.23.1-alpha.0.84 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.82 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.81 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.80 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.79 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.78 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.76 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.74 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.72 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.70 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.69 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.68 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.67 | 0 | 9/25/2026 |
| 0.23.1-alpha.0.66 | 26 | 9/24/2026 |
| 0.23.1-alpha.0.65 | 24 | 9/24/2026 |
| 0.23.1-alpha.0.64 | 30 | 9/24/2026 |
| 0.23.1-alpha.0.62 | 31 | 9/24/2026 |
| 0.23.1-alpha.0.61 | 29 | 9/24/2026 |
| 0.23.1-alpha.0.50 | 31 | 9/24/2026 |
| 0.23.0 | 144 | 9/18/2026 |