Rask.Auth.Client
0.21.1-alpha.0.31
See the version list below for details.
dotnet add package Rask.Auth.Client --version 0.21.1-alpha.0.31
NuGet\Install-Package Rask.Auth.Client -Version 0.21.1-alpha.0.31
<PackageReference Include="Rask.Auth.Client" Version="0.21.1-alpha.0.31" />
<PackageVersion Include="Rask.Auth.Client" Version="0.21.1-alpha.0.31" />
<PackageReference Include="Rask.Auth.Client" />
paket add Rask.Auth.Client --version 0.21.1-alpha.0.31
#r "nuget: Rask.Auth.Client, 0.21.1-alpha.0.31"
#:package Rask.Auth.Client@0.21.1-alpha.0.31
#addin nuget:?package=Rask.Auth.Client&version=0.21.1-alpha.0.31&prerelease
#tool nuget:?package=Rask.Auth.Client&version=0.21.1-alpha.0.31&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.Wasm
The Rask browser host: runs a Rask app's C# components client-side on .NET WebAssembly, with the client halves of the batteries — the mediator and query cache, remote dispatch, accounts, validation and the component kit — on by default. Ships the JS boot scripts, the page shell, and the MSBuild integration that stages them into the published bundle — and, opted in, prerenders every route to static HTML with a sitemap.xml at publish, so a static host serves real pages to visitors and crawlers. 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 | 35 | 9/25/2026 |
| 0.23.1-alpha.0.82 | 36 | 9/25/2026 |
| 0.23.1-alpha.0.81 | 37 | 9/25/2026 |
| 0.23.1-alpha.0.80 | 27 | 9/25/2026 |
| 0.23.1-alpha.0.79 | 45 | 9/25/2026 |
| 0.23.1-alpha.0.78 | 36 | 9/25/2026 |
| 0.23.1-alpha.0.76 | 37 | 9/25/2026 |
| 0.23.1-alpha.0.74 | 31 | 9/25/2026 |
| 0.23.1-alpha.0.72 | 33 | 9/25/2026 |
| 0.23.1-alpha.0.70 | 37 | 9/25/2026 |
| 0.23.1-alpha.0.69 | 37 | 9/25/2026 |
| 0.23.1-alpha.0.68 | 37 | 9/25/2026 |
| 0.23.1-alpha.0.67 | 47 | 9/25/2026 |
| 0.23.1-alpha.0.66 | 33 | 9/24/2026 |
| 0.23.1-alpha.0.65 | 37 | 9/24/2026 |
| 0.23.1-alpha.0.64 | 33 | 9/24/2026 |
| 0.23.1-alpha.0.62 | 31 | 9/24/2026 |
| 0.23.1-alpha.0.61 | 33 | 9/24/2026 |
| 0.23.0 | 98 | 9/18/2026 |
| 0.21.1-alpha.0.31 | 53 | 9/11/2026 |