Changelog
Getting Started

Configuration

Reference for AuthEndpointsOptions and nested passkey/JWT settings.

Configure the facade via AddAuthEndpoints<TUser, TContext>(…) or, with roles, AddAuthEndpoints<TUser, TRole, TContext>(…).

AuthEndpointsOptions

PropertyDefaultDescription
IdentityPath/identityRoute prefix for Identity management + cookie sign-in
PasskeyPath/accountRoute prefix for passkey endpoints
RequireConfirmedAccounttrueIdentity requires a confirmed account before sign-in
Passkeys(enabled)Nested passkey options
Jwt(disabled)Nested JWT options
ConfigureIdentitynullOptional Action<IdentityOptions> applied after secure defaults
ConfigurePasskeysnullOptional Action<IdentityPasskeyOptions> after ServerDomain is applied
RequireEmailSenderInProductiontrueProduction must register a real IEmailSender<TUser> (not Identity's no-op)

Passkeys

AuthEndpointsPasskeyOptions:

PropertyDefaultDescription
EnabledtrueWhen false, passkey DI and mapping are skipped
ServerDomainnullWebAuthn relying-party domain (e.g. example.com). Required in Production when enabled

JWT

AuthEndpointsJwtOptions:

PropertyDefaultDescription
EnabledfalseWhen true, registers and maps JWT endpoints
Path/authRoute prefix for JWT endpoints
ConfigurenullOptional Action<SimpleJwtOptions> for issuer, audience, signing, lifetimes

SimpleJwtOptions (via Jwt.Configure)

Common settings:

PropertyNotes
Issuer / AudienceProduction rejects the library defaults (Jwt / JwtAudience)
AccessTokenLifetimeDefault 15 minutes
SigningOptionsSymmetric (key ≥ 32 UTF-8 bytes), RSA, ECDSA, or X509
TokenValidationParametersOptional override of validation parameters

When JWT is enabled, call modelBuilder.UseRefreshToken() on your DbContext and migrate.

Example

builder.Services.AddAuthEndpoints<AppUser, AppDbContext>(o =>
{
    o.IdentityPath = "/auth/cookie";
    o.PasskeyPath = "/auth/passkey";
    o.RequireConfirmedAccount = true;
    o.Passkeys.ServerDomain = "example.com";
    o.ConfigureIdentity = identity =>
    {
        identity.Password.RequiredLength = 10;
    };
    o.Jwt.Enabled = true;
    o.Jwt.Path = "/auth/jwt";
    o.Jwt.Configure = jwt =>
    {
        jwt.Issuer = "https://example.com";
        jwt.Audience = "https://example.com";
        jwt.SigningOptions.SymmetricKey = builder.Configuration["Jwt:SymmetricKey"];
    };
});

For advanced stacks that skip the facade, see Composable endpoint requirements.