Toamaisutaa.AspNetCore
0.15.0
dotnet add package Toamaisutaa.AspNetCore --version 0.15.0
NuGet\Install-Package Toamaisutaa.AspNetCore -Version 0.15.0
<PackageReference Include="Toamaisutaa.AspNetCore" Version="0.15.0" />
<PackageVersion Include="Toamaisutaa.AspNetCore" Version="0.15.0" />
<PackageReference Include="Toamaisutaa.AspNetCore" />
paket add Toamaisutaa.AspNetCore --version 0.15.0
#r "nuget: Toamaisutaa.AspNetCore, 0.15.0"
#:package Toamaisutaa.AspNetCore@0.15.0
#addin nuget:?package=Toamaisutaa.AspNetCore&version=0.15.0
#tool nuget:?package=Toamaisutaa.AspNetCore&version=0.15.0
Toamaisutaa.AspNetCore
Start here. This is the package most applications install: authorization, ICurrentUser, and
every endpoint Toamaisutaa maps. It depends on
Toamaisutaa.OpenIdConnect, so one install gets you token validation as well.
dotnet add package Toamaisutaa.AspNetCore
builder.Services.AddToamaisutaaBearer(builder.Configuration);
builder.Services.AddToamaisutaaAuthorization(builder.Configuration);
app.UseAuthentication();
app.UseAuthorization();
app.MapToamaisutaaConfiguration(); // GET /api/app, for the SPA to read at startup
Requires .NET 10. That is the whole minimum - authenticated by default, [AllowAnonymous] to opt
out, and no database at all.
What it adds
- Authenticated by default, with an optional admin role and policy. An application can also authenticate however it likes and use only the policies.
ICurrentUser- the subject, display name, roles and claims from the token, and the local user row if you provision one.GET /api/app- the runtime OIDC configuration a SPA reads at startup, so the authority and client id live in one place rather than being baked into a bundle.
Optional: local password login
For deployments that cannot run an identity provider. Off unless you ask for it.
builder.Services.AddToamaisutaaPasswordLogin(builder.Configuration); // section "LocalLogin"
builder.Services.AddSingleton<IPasswordResetNotifier, YourEmailSender>();
app.MapToamaisutaaPasswordEndpoints();
Maps /auth/login, /auth/refresh, /auth/logout, /auth/register, /auth/password,
/auth/password/forgot and /auth/password/reset. The anonymous ones throttle themselves through a
rate limiter this package owns, so forgetting UseRateLimiter() cannot leave them unprotected.
You must supply an IPasswordResetNotifier - sending mail is not an authentication library's job,
and this one deliberately ships no implementation. That, a store registration and the bearer layer
are all checked at startup rather than at the first sign-in.
Optional: two-factor authentication
builder.Services.AddToamaisutaaTwoFactor(builder.Configuration); // section "TwoFactor"
app.MapToamaisutaaTwoFactorEndpoints();
TOTP with recovery codes, and no new dependency. Once a user enrols, /auth/login returns an opaque
single-use challenge instead of tokens and the sign-in finishes at /auth/2fa/verify. Locally issued
tokens carry amr per RFC 8176, and a Toamaisutaa.TwoFactor policy is registered for routes that
should require a second factor.
Why not ASP.NET Core Identity?
Because Identity assumes it owns the users, and this assumes your identity provider does. Identity has no built-in OIDC support, its endpoints issue proprietary tokens rather than JWTs, and a local user table is mandatory. Here all three are the other way round. Use Identity for a self-contained application that owns its users - it ships with the framework and is better tested than this.
The longer answer, with the comparison table.
Optional: trusted devices
builder.Services.AddToamaisutaaTrustedDevices(builder.Configuration); // section "TrustedDevices"
app.MapToamaisutaaTrustedDeviceEndpoints();
"Remember this device", as a cached second factor: it rotates on every use with reuse detection, dies
with any credential change, and never stands in for the password. Tokens carry toa_2fa_source and
toa_2fa_at, so a sensitive route can require a fresh second factor rather than a cached one.
Storage
The optional features need somewhere to put a user. Add Toamaisutaa.EntityFrameworkCore and one of
the four migration packages, or implement the store interfaces yourself.
Documentation
Getting started - docs.toamaisutaa.pianonic.ch
Licensed under PolyForm Noncommercial 1.0.0 - free for noncommercial use; commercial use needs a separate licence.
| 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
- Toamaisutaa.Core (>= 0.15.0)
- Toamaisutaa.OpenIdConnect (>= 0.15.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Toamaisutaa.AspNetCore:
| Package | Downloads |
|---|---|
|
Toamaisutaa.Passkeys
Opt-in passkey (WebAuthn) authentication for Toamaisutaa: registration and assertion endpoints, a per-user credential list, and passwordless sign-in that satisfies the two-factor policy on its own. Nothing else references this package - install it only if you want passkeys, and are willing to carry the FIDO2 dependency they need. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.15.0 | 155 | 11/6/2026 |
| 0.14.0 | 182 | 10/29/2026 |
| 0.13.0 | 148 | 10/28/2026 |
| 0.12.0 | 127 | 10/28/2026 |
| 0.11.0 | 126 | 10/28/2026 |
| 0.10.0 | 123 | 10/23/2026 |
| 0.9.0 | 133 | 9/30/2026 |
| 0.8.1 | 126 | 9/30/2026 |
| 0.8.0 | 122 | 9/30/2026 |
| 0.7.0 | 1,647 | 8/16/2026 |
| 0.6.0 | 136 | 8/16/2026 |
| 0.5.0 | 132 | 8/12/2026 |
| 0.4.0 | 134 | 8/12/2026 |
| 0.3.0 | 132 | 8/11/2026 |
| 0.2.0 | 132 | 8/11/2026 |
| 0.1.0 | 131 | 8/11/2026 |