AuthEndpoints 3.0.0-rc.2
See the version list below for details.
dotnet add package AuthEndpoints --version 3.0.0-rc.2
NuGet\Install-Package AuthEndpoints -Version 3.0.0-rc.2
<PackageReference Include="AuthEndpoints" Version="3.0.0-rc.2" />
<PackageVersion Include="AuthEndpoints" Version="3.0.0-rc.2" />
<PackageReference Include="AuthEndpoints" />
paket add AuthEndpoints --version 3.0.0-rc.2
#r "nuget: AuthEndpoints, 3.0.0-rc.2"
#:package AuthEndpoints@3.0.0-rc.2
#addin nuget:?package=AuthEndpoints&version=3.0.0-rc.2&prerelease
#tool nuget:?package=AuthEndpoints&version=3.0.0-rc.2&prerelease
AuthEndpoints
AuthEndpoints is an ASP.NET Core library that gives you ready-made auth API endpoints on top of ASP.NET Core Identity. It is a good fit for a single-backend API serving a SPA or frontend app with first-party email/password, cookies, JWT, and/or passkeys.
It provides a number of features that make it easy to build first-party auth fast, keep defaults safer for production, and compose only what you need, including:
- Ready-made endpoints - instead of wiring registration, login, password reset, 2FA, and session/token flows yourself, map a small set of composable endpoints (or use the opinionated facade) and ship
- Opinionated quick start -
AddAuthEndpoints/UseAuthEndpoints/MapAuthEndpointsfor cookie Identity + passkeys with secure defaults - Account lifecycle - register, email confirm/resend, forgot/reset password, manage info and 2FA, step-up ReAuth
- Sign-in stacks you choose - cookie sessions, Identity bearer tokens, or simple JWT (create / refresh / verify / logout)
- Passkeys (WebAuthn) - passwordless register and login endpoints
- Built-in hardening - rate limiting, antiforgery for cookie flows, lockout-aware login, hashed JWT refresh tokens with reuse detection
Installing via NuGet
dotnet add package AuthEndpoints --version 3.0.0-rc.2
Requirements: .NET 10, ASP.NET Core Identity, and EF Core for the user store.
Quick start (recommended)
Your frontend is a separate SPA that calls these routes on the ASP.NET Core API.
// Program.cs
builder.Services.AddDbContext<AppDbContext>(/* your provider */);
builder.Services.AddAuthEndpoints<AppUser, AppDbContext>(o =>
{
o.Passkeys.ServerDomain = "example.com"; // required in Production
});
// Required in Production (Identity's no-op sender is rejected).
builder.Services.AddTransient<IEmailSender<AppUser>, MyEmailSender>();
var app = builder.Build();
app.UseAuthEndpoints(); // authentication, authorization, rate limiting, antiforgery
app.MapAuthEndpoints<AppUser>(); // /identity (management + cookie) + /account (passkeys)
app.Run();
Default routes (facade)
| Area | Path prefix | Main routes |
|---|---|---|
| Management + cookie | /identity |
register, login, logout, csrfToken, confirm/forgot/reset, manage/*, confirmIdentity |
| Passkeys | /account |
passkeys register/login options + complete |
| JWT (if enabled) | /auth |
create, refresh, verify, logout, csrfToken |
SPA usage notes
Cookie stack
- Send cookies with credentials (
credentials: "include"/ AxioswithCredentials). - Call
GET /identity/csrfToken, then send the token asRequestVerificationTokenon unsafe methods (POST/PUT/PATCH/DELETE).
JWT stack (when enabled)
POST /auth/createreturns an access token; send it asAuthorization: Bearer ….- Refresh token is an HttpOnly cookie;
POST /auth/refreshandPOST /auth/logoutneed CSRF (GET /auth/csrfToken+RequestVerificationToken).
Enable JWT (facade opt-in)
builder.Services.AddAuthEndpoints<AppUser, AppDbContext>(o =>
{
o.Passkeys.ServerDomain = "example.com";
o.Jwt.Enabled = true;
o.Jwt.Path = "/auth";
o.Jwt.Configure = jwt =>
{
jwt.Issuer = "https://example.com";
jwt.Audience = "https://example.com";
jwt.SigningOptions.SymmetricKey = builder.Configuration["Jwt:SymmetricKey"];
};
});
Reauthentication (step-up)
Mapped with Identity management under /identity:
GET /identity/manage/authMethodsPOST /identity/confirmIdentitywith exactly one of:password,twoFactorCode,twoFactorRecoveryCode,credentialJson- Cookie clients receive an
AuthEndpoints.ReAuthcookie; API clients also getreauthTokenfor theX-AuthEndpoints-Reauthheader
Passkey passwordless flow
POST /account/passkeys/register/optionswith{ "email": "..." }- Browser
navigator.credentials.create(...) POST /account/passkeys/registerwith{ "email": "...", "credentialJson": "..." }
Advanced composition
Compose modules yourself when you need bearer Identity, custom paths, or JWT-only. Map management once in production hosts.
builder.Services
.AddIdentityApiEndpoints<AppUser>(o =>
{
o.Stores.SchemaVersion = IdentitySchemaVersions.Version3;
})
.AddEntityFrameworkStores<AppDbContext>()
.AddDefaultTokenProviders();
builder.Services.AddAntiforgery();
builder.Services.AddCookieAuthEndpoints(); // rate limits + ReAuth schemes
builder.Services.AddPasskeyEndpoints();
builder.Services.AddJwtEndpoints<AppUser, AppDbContext>(o =>
{
o.Issuer = "https://example.com";
o.Audience = "https://example.com";
o.SigningOptions.SymmetricKey = builder.Configuration["Jwt:SymmetricKey"];
});
var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.UseRateLimiter();
app.UseAntiforgery();
// Cookie SPA
app.MapGroup("/identity").MapIdentityManagementApi<AppUser>();
app.MapGroup("/identity").MapCookieAuthEndpoints<AppUser>();
// Or Identity bearer
// app.MapGroup("/identity").MapIdentityManagementApi<AppUser>();
// app.MapGroup("/identity").MapBearerAuthEndpoints<AppUser>();
// Or JWT-only (no cookie login)
// app.MapGroup("/account").MapIdentityManagementApi<AppUser>();
// app.MapGroup("/auth").MapJwtAuthEndpoints<AppUser>();
app.MapGroup("/account").MapPasskeyEndpoints<AppUser>();
Production checklist
- Use HTTPS
- Register a real
IEmailSender<TUser>(Identity's no-op sender is rejected in Production) - Set
Passkeys.ServerDomainwhen passkeys are enabled - For JWT: non-default issuer/audience and a symmetric key of at least 256 bits (32 UTF-8 bytes) in Production
- Recreate the
AuthEndpointsRefreshTokenstable if upgrading from plaintext refresh-token storage (tokens are stored hashed with family reuse detection)
| 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.AspNetCore.Authentication.JwtBearer (>= 10.0.2)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AuthEndpoints:
| Package | Downloads |
|---|---|
|
AuthEndpoints.External.OAuth
Minimal API endpoints for external OAuth authentication (GitHub, Google) with ASP.NET Core Identity |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.1.0 | 36 | 9/20/2026 | |
| 3.0.8 | 51 | 9/19/2026 | |
| 3.0.7 | 133 | 9/8/2026 | |
| 3.0.6 | 104 | 9/7/2026 | |
| 3.0.5 | 117 | 9/6/2026 | |
| 3.0.4 | 107 | 9/4/2026 | |
| 3.0.3 | 111 | 9/2/2026 | |
| 3.0.2 | 114 | 8/31/2026 | |
| 3.0.1 | 124 | 8/28/2026 | |
| 3.0.0 | 138 | 8/27/2026 | |
| 3.0.0-rc.4 | 101 | 8/2/2026 | |
| 3.0.0-rc.3 | 95 | 7/30/2026 | |
| 3.0.0-rc.2 | 133 | 7/25/2026 | |
| 3.0.0-rc.1 | 96 | 7/25/2026 | |
| 3.0.0-alpha.11 | 99 | 7/24/2026 | |
| 3.0.0-alpha.8 | 334 | 12/20/2025 | |
| 3.0.0-alpha.7 | 250 | 12/19/2025 | |
| 3.0.0-alpha.6 | 393 | 12/19/2025 | |
| 3.0.0-alpha.5 | 324 | 11/23/2025 | |
| 3.0.0-alpha.4 | 328 | 11/10/2025 |