Rask.Auth.Client
0.20.1-alpha.0.236
dotnet add package Rask.Auth.Client --version 0.20.1-alpha.0.236
NuGet\Install-Package Rask.Auth.Client -Version 0.20.1-alpha.0.236
<PackageReference Include="Rask.Auth.Client" Version="0.20.1-alpha.0.236" />
<PackageVersion Include="Rask.Auth.Client" Version="0.20.1-alpha.0.236" />
<PackageReference Include="Rask.Auth.Client" />
paket add Rask.Auth.Client --version 0.20.1-alpha.0.236
#r "nuget: Rask.Auth.Client, 0.20.1-alpha.0.236"
#:package Rask.Auth.Client@0.20.1-alpha.0.236
#addin nuget:?package=Rask.Auth.Client&version=0.20.1-alpha.0.236&prerelease
#tool nuget:?package=Rask.Auth.Client&version=0.20.1-alpha.0.236&prerelease
Rask.Auth.Client
The browser half of Rask.Auth. Register it and a WebAssembly app has the same three flows a server-rendered one has — written the same way.
var builder = WasmHostBuilder.CreateDefault();
builder.Services.AddRaskAuthClient();
await builder.RunAsync<App>();
That is the whole of it. After that a component reads the current user and signs somebody in with exactly the code it would use on the Server host:
public sealed class LoginForm(IAuth auth) : Component
{
private async Task SubmitAsync(Credentials c) =>
await auth.SignInAsync(c.Email, c.Password, returnUrl: "/");
}
public sealed class Header(IUserProvider users) : Component
{
protected override Component Render() =>
Authorize
.NotAuthorized(NavLink.Href("/login")["Sign in"])
.Authorized(user => Span[$"Hi, {user.Identity?.Name}"]);
}
What it does
AddRaskAuthClient() replaces the browser host's anonymous IUserProvider with one that reads the
app's own GET /api/auth/me, and registers an IAuth that posts to /api/auth/register, /login
and /logout. Calls are same-origin, so the auth cookie rides along on its own — no token is ever
held in JavaScript, and there is nothing for a script on the page to read.
The current user is loaded before the first render, so a page never paints anonymous and then flips.
What it deliberately does not carry
ASP.NET Core Identity and Entity Framework. Those live in Rask.Auth, on the server, and have no
business in a trimmed browser publish. The two halves agree through the AuthApi wire contract in
Rask.Core rather than by referencing each other.
Full documentation: rask.sh · docs/authentication.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
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Rask.Auth.Client:
| Package | Downloads |
|---|---|
|
Rask
The one reference a Rask application needs, server or browser. On net10.0 it brings the ASP.NET host plus every battery — database, mediator, background jobs, transactional email, cache, outbox, operator dashboard, durable logs, Web Push, and SQLite snapshots and continuous backup — with RaskApp.Create(args) as the entry point. On net10.0-browser it brings the WebAssembly host, the source-generated mediator, the query cache and remote dispatch. Everything referenced is wired and on; app.Configure(c => c.Jobs.Off()) is how an app does without one. Reference Rask.Server for a lean host with no database. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.20.1-alpha.0.236 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.235 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.234 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.233 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.232 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.231 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.230 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.229 | 0 | 9/7/2026 |
| 0.20.1-alpha.0.228 | 35 | 9/4/2026 |
| 0.20.1-alpha.0.227 | 33 | 9/4/2026 |
| 0.20.1-alpha.0.226 | 37 | 9/4/2026 |
| 0.20.1-alpha.0.225 | 42 | 9/4/2026 |
| 0.20.1-alpha.0.224 | 41 | 9/4/2026 |
| 0.20.1-alpha.0.223 | 38 | 9/4/2026 |