AuthEndpoints 4.1.1

dotnet add package AuthEndpoints --version 4.1.1
                    
NuGet\Install-Package AuthEndpoints -Version 4.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AuthEndpoints" Version="4.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AuthEndpoints" Version="4.1.1" />
                    
Directory.Packages.props
<PackageReference Include="AuthEndpoints" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AuthEndpoints --version 4.1.1
                    
#r "nuget: AuthEndpoints, 4.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AuthEndpoints@4.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AuthEndpoints&version=4.1.1
                    
Install as a Cake Addin
#tool nuget:?package=AuthEndpoints&version=4.1.1
                    
Install as a Cake Tool

<p align="center"> <img src="https://raw.githubusercontent.com/madeyoga/AuthEndpoints/main/.github/assets/banner.png" alt="AuthEndpoints: authentication library for ASP.NET Core Identity" width="100%"> </p>

AuthEndpoints

<p> <a href="https://github.com/madeyoga/AuthEndpoints/actions/workflows/dotnet.yml"><img src="https://github.com/madeyoga/AuthEndpoints/actions/workflows/dotnet.yml/badge.svg?branch=main" alt="Build"></a> <a href="https://www.nuget.org/packages/AuthEndpoints"><img src="https://img.shields.io/nuget/v/AuthEndpoints.svg?style=flat&colorA=18181B&colorB=14B8A6" alt="Version"></a> <a href="https://www.nuget.org/packages/AuthEndpoints"><img src="https://img.shields.io/nuget/dt/AuthEndpoints.svg?style=flat&colorA=18181B&colorB=14B8A6" alt="Downloads"></a> <a href="https://github.com/madeyoga/AuthEndpoints/blob/main/LICENSE"><img src="https://img.shields.io/github/license/madeyoga/AuthEndpoints.svg?style=flat&colorA=18181B&colorB=14B8A6" alt="License"></a> <a href="https://authendpoints.harten.id"><img src="https://img.shields.io/badge/Docs-18181B?logo=dotnet" alt="Docs"></a> </p>

AuthEndpoints is an authentication library for ASP.NET Core Identity that gives you ready-made login, register, refresh, 2FA, passkey and password reset endpoints. It is for your own web and mobile clients. You keep ASP.NET Core Identity, your user type, and your database. Built for first-party SPAs, mobile apps, and APIs.

  • Cookie sessions for browser apps, and JWT bearer sessions with refresh for token clients
  • Two-factor authentication, passkeys (WebAuthn), and email-code sign-in
  • Account lifecycle: register, confirm email, reset password, manage account, and step-up ReAuth
  • Hardening: rate limits, antiforgery, lockout-aware login, and refresh-token reuse detection
  • GitHub and Google sign-in. See External OAuth

Why not MapIdentityApi?

MapIdentityApi maps one fixed set of Identity API endpoints. AuthEndpoints covers register, login, refresh, and password reset, and adds cookie sessions, JWT bearer sessions, passkeys, logout, and a choice of which routes to map.

The route-by-route comparison is in AuthEndpoints compared with MapIdentityApi.

Getting started

Requires .NET 10, ASP.NET Core Identity, and EF Core.

dotnet add package AuthEndpoints
builder.Services.AddDbContext<AppDbContext>(/* your provider */);

builder.Services.AddPasswordAuth<AppUser, AppDbContext>(o =>
{
    o.Passkeys.ServerDomain = "example.com"; // omit to leave passkeys off
});

builder.Services.AddTransient<IEmailSender<AppUser>, MyEmailSender>();

var app = builder.Build();

app.UseAuthEndpoints();
app.MapPasswordAuth<AppUser>();

app.Run();

This maps register, login, logout, email confirmation, password reset, ReAuth, and account management (/auth/manage/info, /auth/manage/2fa, /auth/manage/password) under /auth, plus passkeys under /auth/passkeys when ServerDomain is set; see the endpoint reference for every route.

Documentation

Guides, route tables, and production setup are at https://authendpoints.harten.id.

AI agents

Add the coding-agent skill from this repository:

npx skills add madeyoga/AuthEndpoints

See AI agents.

Contribute

Issues and pull requests are welcome. Read CONTRIBUTING.md first, and look for issues labeled good first issue to get started.

License

This project is licensed under the MIT License.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on AuthEndpoints:

Package Downloads
AuthEndpoints.OAuth.GitHub

GitHub OAuth provider for AuthEndpoints. Registers the GitHub handler only. Map routes with MapExternalAuthProvider.

AuthEndpoints.OAuth.Google

Google OAuth provider for AuthEndpoints. Registers the Google handler only. Map routes with MapExternalAuthProvider.

AuthEndpoints.External.OAuth

Forwarding shim. The external OAuth endpoints moved into AuthEndpoints 4.0. Remove this package reference; no code changes are needed.

AuthEndpoints.OpenIddict

Opt-in OAuth 2.0 and OpenID Connect authorization server for AuthEndpoints apps, built on OpenIddict. Authorization code + PKCE (S256), rotating refresh tokens, a host-rendered consent step, opt-in ID tokens, userinfo, and logout, and optional dynamic client registration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.1.1 0 11/11/2026
4.1.0 271 10/31/2026
4.0.4 772 10/27/2026
4.0.3 114 10/23/2026
4.0.2 101 10/20/2026
4.0.1 108 10/18/2026
4.0.0 651 10/15/2026
3.4.1 113 10/12/2026
3.4.0 108 10/12/2026
3.3.1 103 10/12/2026
3.3.0 111 10/11/2026
3.2.0 237 10/8/2026
3.1.1 114 10/4/2026
3.1.0 262 9/20/2026
3.0.8 131 9/19/2026
3.0.7 170 9/8/2026
3.0.6 134 9/7/2026
3.0.5 148 9/6/2026
3.0.4 139 9/4/2026
3.0.3 146 9/2/2026
Loading failed

Password reset and email sign-in codes are now sent only to the account's stored email address. If an account has no stored email, no code is sent.