Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

580 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AuthEndpoints

nuget issues downloads workflow license

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

  • Ready-made endpoints for registration, login, password reset, 2FA, and session/token flows
  • Opinionated quick start with AddAuthEndpoints / UseAuthEndpoints / MapAuthEndpoints
  • Account lifecycle: register, confirm email, forgot/reset password, manage info and 2FA, step-up ReAuth
  • Sign-in stacks you choose: cookie sessions, Identity bearer tokens, or Simple JWT
  • Passkeys (WebAuthn) for passwordless register and login
  • Built-in hardening: rate limiting, antiforgery, lockout-aware login, hashed JWT refresh tokens with reuse detection

Getting started

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

dotnet add package AuthEndpoints --version 3.0.0-rc.2
builder.Services.AddDbContext<AppDbContext>(/* your provider */);

builder.Services.AddAuthEndpoints<AppUser, AppDbContext>(o =>
{
    o.Passkeys.ServerDomain = "example.com"; // required in Production
});

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

var app = builder.Build();

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

app.Run();

Documentation

For configuration, composable modules, route tables, and production guidance, see the AuthEndpoints documentation.

Contribute

Issues and pull requests are welcome. Open an issue at madeyoga/AuthEndpoints to report bugs or propose changes.

License

This project is licensed under the MIT License.

About

Auth library for ASP.NET Core that provides minimal API endpoints for registration, email verification, password reset, login/logout, 2FA, JWT, and passkeys (WebAuthn).

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages