Changelog
Getting Started

Introduction

AuthEndpoints is an ASP.NET Core library of ready-made Identity auth endpoints for SPA backends.

AuthEndpoints gives you ready-made auth API endpoints on top of ASP.NET Core Identity. It fits a single-backend API serving a SPA or frontend with first-party email/password, cookies, JWT, and/or passkeys.

Why AuthEndpoints?

  • Ready-made endpoints — map registration, login, password reset, 2FA, and session/token flows instead of wiring them yourself
  • Opinionated quick startAddAuthEndpoints / UseAuthEndpoints / MapAuthEndpoints for cookie Identity + passkeys with secure defaults
  • Sign-in stacks you choose — cookie sessions, Identity bearer tokens, or JWT
  • Passkeys (WebAuthn) — passwordless register and login
  • Built-in hardening — rate limiting, antiforgery for cookie flows, lockout-aware login, hashed JWT refresh tokens with reuse detection

Facade vs compose

ApproachWhen to use
FacadeCookie SPA + passkeys (and optional JWT). One DI call, one pipeline call, one map call.
ComposeIdentity bearer, custom path prefixes, JWT-only, or a custom mix of modules.

See Quick start for the facade, and Composable endpoints when you need to assemble modules yourself.

Modules

ModuleRole
Identity managementRegister, confirm email, forgot/reset password, manage info and 2FA
Cookie authCookie login/logout + CSRF token
Bearer authIdentity bearer login/refresh/logout
JWTJWT access tokens + HttpOnly refresh cookie
PasskeysWebAuthn passwordless + credential management
ReAuthStep-up confirmation for sensitive actions
External OAuthGitHub/Google OAuth (separate preview package)
External OAuth (AuthEndpoints.External.OAuth) is a preview package with its own version. It is not included in the core AuthEndpoints NuGet package.

Requirements

  • .NET 10
  • ASP.NET Core Identity
  • EF Core for the user store