Upgrade to 4.0Changelog

Changelog

Release notes for AuthEndpoints. Each entry summarizes what shipped; full notes and assets live on GitHub Releases.
AuthEndpoints on NuGetAuthEndpoints.External.OAuth on NuGet
Preview

AuthEndpoints.OpenIddict 4.0.0-preview.1

New opt-in OAuth 2.0 authorization server and OpenID Connect provider for AuthEndpoints 4 apps, built on OpenIddict 7.7.

AuthEndpoints.OpenIddict

  • New package. AddAuthEndpointsOpenIddict<TUser, TContext>(), modelBuilder.UseAuthEndpointsOpenIddict<TUser>(), and MapAuthEndpointsOpenIddict() turn an AuthEndpoints app into an OAuth 2.0 authorization server. It depends on AuthEndpoints [4.0.0, 5.0.0) and OpenIddict 7.7.2.
  • Authorization code flow with PKCE (S256 only). Refresh tokens rotate on every use with no reuse leeway. Access tokens are reference tokens that last 15 minutes. POST /connect/revoke revokes tokens, and GET /.well-known/oauth-authorization-server serves RFC 8414 metadata.
  • /connect/authorize sends signed-out users to LoginUrl with a returnUrl on this server, and signed-in users to ConsentUrl?request={id}. The host's consent page approves or denies through MapOAuthConsentEndpoints() or IOAuthConsentService. IOAuthPrincipalFactory sets the token subject; the default is the Identity user id.
  • Dynamic client registration (RFC 7591) and protected resource metadata (RFC 9728) are off by default. Registration accepts public clients only, validates redirect URIs, and is rate limited per client IP.
  • Every code exchange and refresh checks the approving user again: the user must still exist, be able to sign in, not be locked out, and have the same security stamp. A failed check returns invalid_grant and revokes the grant. Changing the password, resetting the authenticator, or calling UpdateSecurityStampAsync ends the user's OAuth grants.
  • OpenID Connect is opt-in: add openid to Scopes. The token endpoint then returns ID tokens with iss, aud, sub (from IOAuthPrincipalFactory), nonce, and amr, plus email and email_verified with the email scope. /connect/userinfo, /connect/logout, and /.well-known/openid-configuration are served. A host without openid keeps OAuth 2.0 only, and openid is rejected.
  • amr reflects how the user signed in: password (pwd), two-factor (pwd, otp, mfa), passkey (pop, plus mfa when Identity requires user verification), external (fed), and email code (otp). ID token claims never reach access tokens, and the approving user's id and security stamp never reach any token.
  • Logout redirects only to a post-logout URI registered for the client named by client_id or id_token_hint, and signs a user out only with an id_token_hint issued to that user, or through the optional LogoutUrl confirmation page. Configured clients, dynamically registered clients, and developer apps can register post-logout redirect URIs.
  • The issuer, endpoint URLs, and audience come from configuration, never from the request Host header. HTTPS, resource validation, and per-client resource permissions are on by default.
  • Clients can be defined in configuration and created with SeedOAuthClientsAsync(). Signing and encryption keys come from a persisted self-signed pair (Certificates.Path), certificates you supply, or ephemeral keys for tests.

Enabling the package needs a migration that adds the OpenIddict tables and the OAuthRequests table. OpenID Connect in this preview has no profile, phone, or address claims and no auth_time, so prompt=login and max_age are refused, and logout is RP-initiated only. See the package README's Limitations section for the other known gaps.

Packages

  • AuthEndpoints.OpenIddict 4.0.0-preview.1 (new)
  • AuthEndpoints unchanged at 4.1.0
  • AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google unchanged at 4.0.1
Latest

v4.1.0

Users can list and revoke their signed-in sessions, AddPasswordAuth registers Identity roles, and clients can list external sign-in providers.

AuthEndpoints

Active sessions. Users can list where they are signed in and sign out other browsers or devices, for cookie and JWT sessions. It is off by default. Turn it on with builder.UseActiveSessions() in OnModelCreating, AddActiveSessions<TUser, TContext>(), and MapActiveSessionEndpoints<TUser>(). That maps GET /auth/sessions, DELETE /auth/sessions/{id}, and POST /auth/sessions/revokeOthers. Revoking needs a recent re-authentication. Identity bearer tokens are not supported, and the app fails at startup if it maps them while active sessions are on.

Roles on the password facade. AddPasswordAuth<TUser, TRole, TContext> registers Identity roles before the EF stores, so a host that uses roles can stay on the facade.

External sign-in providers. GET /auth/external/providers returns { "scheme", "displayName" } for each registered provider, in registration order. AddExternalAuthEndpoints<TUser>() maps the account routes when no provider is registered yet; the providers and logins lists then return [].

Two-factor settings. GET /auth/manage/2fa returns recoveryCodesLeft next to isTwoFactorEnabled. Enabling two-factor keeps the user's step-up confirmation with its original expiry: the ReAuth cookie is reissued, and a token sent in X-AuthEndpoints-Reauth comes back renewed in the same response header. Send the renewed token on the next request. A cross-origin browser client can read it only when the CORS policy exposes that header.

JWT signing keys. Startup validation requires the key property that signing reads for the selected algorithm. A host that sets Rsa with only Certificate, X509 with only RsaKey, or Ecdsa without EcdsaKey fails at startup with an error that names the property to set, for example RsaKey is required when Algorithm is Rsa. Set SimpleJwtOptions.SigningOptions.RsaKey.

No host change is required unless the selected JWT algorithm is missing its key. Hosts that do not turn on active sessions need no database migration. Turning on active sessions needs a migration that adds the AuthEndpointsActiveSessions table and, with JWT, a nullable SessionId column on refresh tokens.

Packages

  • AuthEndpoints 4.1.0
  • AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google unchanged at 4.0.1

v4.0.4

Configuration errors name the user type that does not derive from IdentityUser and the signing key property a JWT algorithm needs.

AuthEndpoints

A host whose TUser does not derive from IdentityUser<TKey> gets an error that names the user type, for example AppUser must derive from IdentityUser<TKey> to use AuthEndpoints.

A host that picks the Rsa, Ecdsa, or X509 signing algorithm without its key gets an error that names the missing property and the algorithm, for example RsaKey is required when Algorithm is Rsa. Set SimpleJwtOptions.SigningOptions.RsaKey.

No host change is required. This release adds no database migration.

Packages

  • AuthEndpoints 4.0.4
  • AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google unchanged at 4.0.1

v4.0.3

External sign-in failures always redirect to a local URL, the NuGet README is refreshed, and published packages include build provenance.

AuthEndpoints

A browser that fails external sign-in is sent to a local URL. ErrorPath is used when it is a relative local path. Any other value falls back to /. The redirect keeps error and error_description on that path.

API clients that ask for JSON receive a problem response.

No host change is required. This release adds no database migration.

The package README on NuGet is the current project README.

A published package includes build provenance. Verify the file you downloaded:

gh attestation verify <file>.nupkg -R madeyoga/AuthEndpoints

Packages

  • AuthEndpoints 4.0.3
  • AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google unchanged at 4.0.1

v4.0.2

Email-code sign-in alone leaves the step-up send route unmapped, a password facade with passkeys rejects an extra cookie or management map, and passkey ceremonies require antiforgery only for an ambient credential.

AuthEndpoints

On a host with email-code sign-in only, POST /confirmIdentity/emailCode/send now returns 404 instead of 500, and authMethods.emailCode goes from true to false. The send route and the AuthEndpoints.ConfirmIdentity.EmailCode rate-limit policy belong to email-code send. Sign-in alone left the route mapped without that policy, so each signed-in call to it returned 500. POST /confirmIdentity with { "emailCode" } on that host returns 400 with title EmailCodeProofUnavailable instead of 401.

Hosts that want the step-up send call AddEmailCodeSendEndpoints or AddEmailCodeEndpoints.

No host change is required for apps that already add email-code send. This release adds no database migration.

On a password facade with Passkeys.ServerDomain set, an extra MapCookieAuthEndpoints throws InvalidOperationException with Call AddPasswordEndpoints before MapCookieAuthEndpoints. An extra MapIdentityManagementApi throws Call AddPasswordEndpoints before MapPasswordEndpoints. The throw happens when the map runs, on a JWT session and on a cookie session. AddPasswordAuth registers the passkey sign-in, sign-up, register-options, and management modules, and the passkey module itself. It does not register the password module. On a JWT session it also does not register the cookie-session module. MapAccountManagementEndpoints maps POST /confirmIdentity/passkeyOptions when that passkey module is registered. MapIdentityManagementApi and the 3.x facade always map that route.

No host change is required for a password facade that maps only MapPasswordAuth. This note adds no database migration.

Passkey ceremonies

The anonymous ceremonies POST /passkeys/requestOptions, POST /passkeys/register/options, POST /passkeys/register, and POST /passkeys/login require an antiforgery token for a cookie session and for JWT with cookie refresh transport. Identity bearer and JWT with body refresh transport do not. MapBearerAuthEndpoints maps no csrfToken route, and JWT body refresh maps none, so those ceremonies no longer ask for a token the host does not issue.

A cookie session ceremony without a token still returns 400 with Invalid or missing CSRF token. JWT cookie refresh still requires the token from GET /csrfToken. Identity bearer and JWT body refresh complete passkey register and login without a token. MapPasskeyEndpoints, MapPasskeySignInEndpoints, and MapPasskeySignUpEndpoints with no session argument keep the token. Pass AuthEndpointsSession.IdentityBearer to omit it on those ceremonies. The bearer facade does.

3.x facade behaviour change: AddAuthEndpoints with IdentityBearer no longer requires antiforgery on POST /account/passkeys/requestOptions, POST /account/passkeys/register/options, POST /account/passkeys/register, and POST /account/passkeys/login. The 3.x cookie facade is unchanged.

Signed-in passkey changes (POST /passkeys/creationOptions, POST /passkeys/, PATCH /passkeys/, DELETE /passkeys/{credentialIdUrl}) still require antiforgery on every session. An Authorization: Bearer access token skips that check. Cookie callers, including useCookies=true, still send the token. A cookie host that calls PATCH /passkeys/ or DELETE /passkeys/{credentialIdUrl} without a token receives 400 with Invalid or missing CSRF token.

The Identity ceremony state lives in the TwoFactorUserIdScheme cookie (Identity.TwoFactorUserId). That cookie is single-use state, not a credential, and clients must send it between the options call and the verify call.

No host change is required for Identity bearer or JWT body passkey clients on the anonymous ceremonies. Cookie and JWT cookie-refresh clients keep sending RequestVerificationToken. This note adds no database migration.

Packages

  • AuthEndpoints 4.0.2
  • AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google 4.0.1

AuthEndpoints 4.0.2 and AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google 4.0.1 include XML docs for IntelliSense.

v4.0.1

Mapping a route group once no longer logs a duplicate-route warning for every route.

AuthEndpoints

Mapping a route group once logged a duplicate-route warning for every route, with the same map named twice. MapGroup("/account").MapCookieSessionEndpoints<TUser>() logged MapCookieSessionEndpoints and MapCookieSessionEndpoints both map POST /account/logout. and the same for GET /account/csrfToken. The app reads a group's endpoints more than once as it starts, and each read looked like another map. A group mapped once stays quiet. Two maps that share a method and path still log once.

  • MapGroup(...).MapCookieSessionEndpoints<TUser>() and the other group maps no longer warn about their own routes
  • Cookie and bearer POST /logout on one prefix still warns once
  • Cookie POST /login from MapPasswordEndpoints and MapCookieAuthEndpoints on one prefix still warns once

No host change is required. This release adds no database migration.

Packages

  • AuthEndpoints 4.0.1
  • AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google unchanged at 4.0.0

v4.0.0

One sign-in completer, email-code step-up, JWT body refresh, set-password, and AddPasswordAuth. AddAuthEndpoints stays the 3.4.1 facade.

AuthEndpoints, External.OAuth, GitHub, and Google

4.0.0 ships AuthEndpoints, the AuthEndpoints.External.OAuth forwarding shim, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google together. The shim and the provider packages depend on AuthEndpoints with the range [4.0.0, 5.0.0).

AddPasswordAuth and MapPasswordAuth are the new password facade. Cookie is the default session. Set Session = AuthEndpointsSession.Jwt for JWT. Identity bearer stays on AddAuthEndpoints. AddAuthEndpoints and MapAuthEndpoints stay the 3.4.1 facade: same options, same routes, not obsolete. They do not gain 4.0-only behaviour except opt-in JWT body transport, the unknown-email hash verify on POST /create, an absolute refresh lifetime, and a lost concurrent refresh that revokes the family.

New building blocks:

  • One sign-in completer, selected with AuthEndpointsSession or a completer name. The 3.x per-method completers are obsolete and still run when a host registers one and the map passes no session.
  • Email-code step-up on POST /confirmIdentity/emailCode/send for users with no password, authenticator, or passkey. External logins do not block it. UseEmailCodes() hosts add a migration for the Purpose column before deploying.
  • JWT RefreshTokenTransport.Body for clients with no cookie jar. Both transports enforce an absolute lifetime, and a lost concurrent refresh revokes the family. Hashed tokens, rotation, reuse that revokes the family, the security-stamp bind, and logout revoke are unchanged. UseRefreshToken() hosts add a migration for AbsoluteExpiresAt.
  • POST /manage/password sets a first password. MapAuthEndpoints does not map it.
  • Forgot-password, resend, email-code send, and passkey registration options return the same response for known and unknown emails. Register already returned an empty 200 for a taken email. 4.0 notifies that owner and runs the same class of work for an unknown email on those routes.

MapGitHubAuthEndpoints and MapGoogleAuthEndpoints are removed. Map MapExternalAuthProvider or MapExternalAuthEndpoints. A missing Add* throws at map time. AuthEndpoints.External.OAuth below 4.0.0 fails the build with AE4000.

Upgrading from 3.4.1

Follow Upgrade to 4.0. Each breaking change has a migration step on that page. POST /register already returned an empty 200 for a taken email. There is no migration for DuplicateUserName or DuplicateEmail.

Packages

  • AuthEndpoints 4.0.0
  • AuthEndpoints.External.OAuth 4.0.0 (forwarding shim)
  • AuthEndpoints.OAuth.GitHub 4.0.0
  • AuthEndpoints.OAuth.Google 4.0.0

v3.3.1

Email-code sign-up survives a conflicting create, and a magic-link LinkUri must be absolute.

AuthEndpoints

Email-code verify no longer returns 500 when sign-up CreateAsync throws DbUpdateException. A concurrent register can win the unique index, and a host TUser can have a required column the sign-up insert does not set. Verify looks the user up by email. A user that is already there follows the existing-user path. Otherwise verify returns the generic 401 with detail Invalid or expired code.

Sign-up sets EmailConfirmed to true before CreateAsync. It does not use the email-confirmation token provider.

A duplicate sign-up that needs two-factor authentication releases the reserved attempt and does not consume the code. That matches the existing-user path.

MagicLink.LinkUri must be an absolute http or https URI and must not contain #. A rooted path is rejected. In Production the URI must be https and its origin must be in AllowedOrigins.

Issuing a code treats SQLite busy (5) and locked (6), and MySQL deadlock 1213, as conflicts, along with SQL Server 1205 and Postgres 40001 / 40P01. The store tries the insert twice. When that call throws, send tries it twice, which is up to four attempts. A conflict that remains returns the same 200 and does not send mail.

A confirmed user's existing password stays in place when verify signs that user in. An unconfirmed user still follows UnconfirmedAccounts.

Upgrading from 3.3.0

  • Hosts that set MagicLink.LinkUri to a rooted path, or to a URI that already contains #, fail startup until LinkUri is an absolute http(s) URI without #.
  • Sign-up no longer requires an email-confirmation token provider.
  • No migration. The email-code table is unchanged.

Packages

  • AuthEndpoints 3.3.1
  • AuthEndpoints.External.OAuth 3.0.0-preview.5
  • AuthEndpoints.OAuth.GitHub and AuthEndpoints.OAuth.Google unchanged at 3.0.0-preview.4

v3.4.0

Smaller Map methods for sessions, passkeys, confirm-email, and account management. Facade routes stay the same.

AuthEndpoints

3.4.0 adds map methods you can call on their own. MapIdentityManagementApi, MapCookieAuthEndpoints, MapBearerAuthEndpoints, MapJwtAuthEndpoints, and MapPasskeyEndpoints stay, and each still maps the same routes as 3.3.0. MapAuthEndpoints keeps that default route set. Nothing in the public API was removed or renamed. This release adds no database migration.

The new maps are password (MapPasswordEndpoints), cookie and Identity bearer sessions (MapCookieSessionEndpoints, MapBearerSessionEndpoints), JWT create and session (MapJwtPasswordEndpoints, MapJwtSessionEndpoints), passkey sign-in and credential management (MapPasskeySignInEndpoints, MapPasskeyManagementEndpoints), shared confirm-email (MapConfirmEmailEndpoints), and account management (MapAccountManagementEndpoints). AddPasswordEndpoints, AddCookieSessionEndpoints, AddBearerSessionEndpoints, AddAccountManagementEndpoints, and AddAuthEndpointsIdentity register the services those maps use. AddAccountAbuseRateLimiting and AddConfirmIdentityRateLimiting are public.

When a Map* method runs and its Add* method was not called, AuthEndpoints writes a warning. The category is AuthEndpoints. The message is {AddMethod} was not called before {MapMethod}. The routes are still mapped. MapConfirmEmailEndpoints warns AddAccountAbuseRateLimiting was not called before MapConfirmEmailEndpoints. when that policy marker is missing. AddPasskeyEndpoints also registers the password, cookie-session, and account-management modules, so a host that only calls AddPasskeyEndpoints before MapIdentityManagementApi and MapCookieAuthEndpoints does not get those warnings.

Mapping the same HTTP method and path twice logs {FirstMap} and {SecondMap} both map {METHOD path}. MapIdentityManagementApi with MapCookieAuthEndpoints does not overlap: management uses PasswordLoginMode.None. MapPasswordEndpoints in cookie mode together with MapCookieAuthEndpoints on the same prefix duplicates POST /login. Cookie and bearer session maps need different prefixes. MapJwtPasswordEndpoints and MapJwtSessionEndpoints can share a prefix. MapPasskeyEndpoints must not share a prefix with MapPasskeySignInEndpoints or MapPasskeyManagementEndpoints.

Confirm-email is mapped once per endpoint name. The default name is AuthEndpointsEndpointNames.ConfirmEmail<TUser>(), which is MapIdentityManagementApi-{TUser}-confirmEmail. A later map with that same name leaves the first route in place. Pass a different confirmEmailEndpointName when two groups should each expose GET /confirmEmail.

MapAccountManagementEndpoints maps POST /confirmIdentity/passkeyOptions when AddPasskeyEndpoints was called. MapIdentityManagementApi still maps that route either way, so the 3.3.0 management set stays intact. MapPasskeySignInEndpoints maps confirm-email on the parent group when that name is new. MapPasskeyEndpoints does not map confirm-email.

POST /confirmIdentity still accepts a password, an authenticator code, a recovery code, or a passkey assertion. An emailed code is not a step-up proof in this release.

An email-code host can skip password register and login. See Email-code only.

Upgrading from 3.3.x

  • Existing Add* and Map* calls keep their routes. No host change is required.
  • Hosts coming from 3.3.0 follow the 3.3.1 MagicLink.LinkUri rule: an absolute http or https URI with no #. A rooted path such as /auth/email-link is accepted when MagicLink.BuildLinkUrl is set.
  • A second confirm-email map that reuses the default endpoint name leaves the first route in place. MapConfirmEmailEndpoints returns a no-op builder in that case. Conventions on that builder do not reach the existing route.
  • A missing Add* is a warning in the AuthEndpoints log category. Register the matching Add* so rate limits, ReAuth schemes, and antiforgery are present.
  • A later AddAuthEndpoints or AddAuthEndpointsIdentity call for the same user type applies its options and registers roles. Requesting a different role type than the one already registered throws at startup.
  • A wrong authenticator code during email-code sign-up, when the create loses to an existing two-factor user, clears the consume and keeps the attempt. That matches the existing-user path.

Packages

  • AuthEndpoints 3.4.0
  • AuthEndpoints.External.OAuth 3.0.0-preview.5
  • AuthEndpoints.OAuth.GitHub and AuthEndpoints.OAuth.Google unchanged at 3.0.0-preview.4

v3.4.1

Passkey register returns the bearer or JWT token response when sign-in is allowed.

AuthEndpoints

Passkey register with RequireConfirmedAccount off and no useCookies or useSessionCookies flag used to throw response has already started. IdentityPasskeySignInCompleter calls SignInAsync, which writes the Identity bearer token body, and then wrote credentialId as a second body.

Register now keeps a single body:

  • Cookie sign-in (useCookies or useSessionCookies) returns 200 with credentialId and sets the application cookie.
  • Identity bearer sign-in returns 200 with AccessTokenResponse. The body has no credentialId.
  • JwtPasskeySignInCompleter returns the JWT /create shape: { "accessToken", "tokenType" } and the refresh cookie. Cookie query flags stay ignored. The body has no credentialId.

When sign-in is not allowed, register still returns 200 with credentialId and does not issue a session or tokens. Login behavior is unchanged. This release adds no database migration.

Upgrading from 3.4.0

  • Bearer and JWT passkey register clients should read the token response. Cookie register returns credentialId.
  • No host change is required for the crash fix.

Packages

  • AuthEndpoints 3.4.1
  • AuthEndpoints.External.OAuth 3.0.0-preview.5
  • AuthEndpoints.OAuth.GitHub and AuthEndpoints.OAuth.Google unchanged at 3.0.0-preview.4

v3.3.0

Opt-in email-code sign-in, with sign-up and magic links off until you enable them.

AuthEndpoints

Email-code sign-in is off until EmailCode.Enabled is true, or until you call AddEmailCodeEndpoints and MapEmailCodeEndpoints. The facade then maps POST {IdentityPath}/emailCode/send and POST {IdentityPath}/emailCode/verify. Neither route uses antiforgery. Send uses AuthEndpoints.EmailCode.Send. Verify uses AuthEndpoints.Login.

Call modelBuilder.UseEmailCodes() and migrate. The table is AuthEndpoints.AuthEndpointsEmailCodes. MapEmailCodeEndpoints throws if that entity is missing from the model.

Send returns 200 with { "expiresInSeconds", "resendAfterSeconds" } for a valid address, including when the address is unknown, the account cannot receive a code, the cooldown or per-address cap applies, the sender throws, or a deadlock or serialization failure still fails after one retry. An invalid address is 400. Verify of a wrong, expired, or exhausted code is 401 with detail Invalid or expired code. A user who has two-factor authentication on must send a TOTP code or a recovery code when RequireTwoFactor is true (the default).

AllowSignUp and MagicLink.Enabled default to false. With sign-up on, a correct code for an unknown address creates one confirmed user with that email as the user name and no password. With the magic link on, the message LinkUrl defaults to LinkUri + "#token=" + token, and verify accepts { "token" } instead of an email and a code.

Outside Development, startup fails until a real IEmailCodeSender<TUser> is registered, unless RequireSenderOutsideDevelopment is false. POST /emailCode/send awaits the sender, so queue the message and return.

Upgrading from 3.2.x

  • Email-code routes are not mapped unless you opt in. Existing password, passkey, JWT, and OAuth sign-in is unchanged.
  • Hosts that opt in call UseEmailCodes() and apply a migration before MapEmailCodeEndpoints.
  • Register IEmailCodeSender<TUser> outside Development. IEmailSender<TUser> does not send the code.
  • Jwt.Enabled does not select JwtEmailCodeSignInCompleter<TUser>. Register it with AddEmailCodeSignInCompleter when verify should issue a Simple JWT.

Packages

  • AuthEndpoints 3.3.0
  • AuthEndpoints.External.OAuth 3.0.0-preview.5
  • AuthEndpoints.OAuth.GitHub and AuthEndpoints.OAuth.Google unchanged at 3.0.0-preview.4

v3.2.0

Step-up is an extra proof bound to the security stamp, and CSRF skips only for an Authorization Bearer header.

AuthEndpoints

A signed-in user without a matching step-up proof gets 403 on passkey mutations, POST /manage/2fa, POST /manage/info, and external login unlink. The step-up credential is never a sign-in and never replaces HttpContext.User. ReAuthPolicy adds no authentication schemes. The requirement succeeds only when the route's sign-in user matches a ReAuth proof with Reauth=true, the same user id, and the user's current security stamp.

.RequireReauth() must be paired with a sign-in authorization. It does not authenticate the application cookie, Identity bearer, or JWT. A route that omits that authorization fails. A request that presents only a step-up cookie or header is rejected.

CSRF is skipped only when a non-empty Authorization: Bearer header is present, Identity bearer or JWT authenticates, and the application cookie does not. Hosts that read the access token from a cookie still send the CSRF token. The filter does not call OnMessageReceived.

POST /confirmIdentity returns reauthToken. Cookie sign-ins also receive the ReAuth cookie. A caller authenticated with Authorization: Bearer receives the token only and sends it on the sensitive call.

Upgrading from 3.1.x

  • A signed-in caller without a matching step-up proof now gets 403 on passkey mutations, POST /manage/2fa, POST /manage/info, and external login unlink.
  • .RequireReauth() must be paired with RequireAuthorization() that signs the user in. The step-up credential is never a sign-in and never replaces HttpContext.User. Without that sign-in authorization, the request fails.
  • Callers authenticated with Authorization: Bearer no longer receive the ReAuth cookie. They keep reauthToken and send X-AuthEndpoints-Reauth. Cookie sign-ins still receive both.
  • CSRF is skipped only when the request has a non-empty Authorization: Bearer header and Identity bearer or JWT authenticates. A token that arrives only in a cookie still needs the CSRF token.
  • Step-up proofs are bound to the user's security stamp. A password change, reset, or UpdateSecurityStampAsync cancels an outstanding ReAuth cookie or X-AuthEndpoints-Reauth token. A proof with no stamp is rejected.

AuthEndpoints.External.OAuth

ExternalReauthFilter is gone. Unlink uses .RequireReauth() together with the management authorize attribute (application cookie, Identity bearer, and JWT). This package needs AuthEndpoints 3.2.0.

Packages

  • AuthEndpoints 3.2.0
  • AuthEndpoints.External.OAuth 3.0.0-preview.5
  • AuthEndpoints.OAuth.GitHub and AuthEndpoints.OAuth.Google unchanged at 3.0.0-preview.4

v3.1.1

Passkey and other CSRF-protected endpoints no longer return 500 when JWT is not enabled.

AuthEndpoints

On hosts without o.Jwt.Enabled, CSRF-protected endpoints returned 500 for callers without an application cookie. The CSRF check tried to authenticate against the JWT Bearer scheme, which those hosts never register. Anonymous passkey requestOptions, register/options, register, and login failed on the default cookie facade and the Identity bearer facade. The check now skips unregistered schemes. Requests without a CSRF token return 400, and requests with a valid token succeed.

  • Anonymous passkey ceremonies work on the default cookie and Identity bearer facades without JWT
  • Missing or invalid CSRF tokens return 400 instead of 500
  • Hosts with JWT enabled behave as before

Packages

  • AuthEndpoints 3.1.1
  • AuthEndpoints.External.OAuth, AuthEndpoints.OAuth.GitHub, and AuthEndpoints.OAuth.Google unchanged at 3.0.0-preview.4
Preview

AuthEndpoints.External.OAuth 3.0.0-preview.4

Verified GitHub and Google email, safe auto-link, link and unlink hardening, and a package split.

AuthEndpoints.External.OAuth

  • GitHub and Google handlers moved to their own packages. This nupkg no longer references either handler.
  • AutoLinkByEmail defaults to false. When enabled, auto-link requires a verified provider email and a confirmed local email.
  • Login and link failures, including remote failure, clear the Identity.External cookie.
  • returnUrl accepts rooted local paths and allowlists absolute origins the same way email-confirmation redirects do.
  • Unlink requires authorization, antiforgery, and ReAuth, and refuses the last sign-in method.
  • JWT completion writes only the refresh cookie.

AuthEndpoints.OAuth.GitHub

  • New package. AddGitHub loads a verified address from the GitHub emails API (verified primary, otherwise any verified address) and drops an unverified profile email.

AuthEndpoints.OAuth.Google

  • New package. AddGoogle sets email_verified from the Google userinfo payload after host configuration.

v3.1.0

ReAuth.Lifetime configures cookie and reauthToken expiry (default 5 minutes).

AuthEndpoints

Hosts can set how long a ReAuth step-up stays valid. AuthEndpointsOptions.ReAuth.Lifetime defaults to 5 minutes and applies to the ReAuth cookie, confirm ExpiresUtc, and header reauthToken together. The cookie stays non-persistent with no sliding expiration. Values must be between 1 and 60 minutes.

  • ReAuth.Lifetime (TimeSpan, default 5 minutes) drives cookie ExpireTimeSpan, confirm ExpiresUtc, and reauthToken expiry
  • Cookie remains non-persistent (IsPersistent = false) with SlidingExpiration = false
  • Startup validation rejects zero, negative, over 60 minutes, and InfiniteTimeSpan
  • Composable hosts use the same IOptions<AuthEndpointsReAuthOptions>

Packages

  • AuthEndpoints 3.1.0
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3

v3.0.8

Passkey login requestOptions takes JSON email; MapPasskeyEndpoints fails fast if the user store lacks passkey or email support.

AuthEndpoints

Passkey login requestOptions takes JSON { "email" } instead of ?username=. Unknown or empty email still returns 200 usernameless options. MapPasskeyEndpoints fails fast at map time if the user store lacks passkey or email support.

Signed-in passkey add rejects an attestation whose user id is not the current user and does not store it. Missing credentials on delete and rename return 404. Invalid credential ids and a ceremony that is not underway return validation problems. Add accepts optional name; list and add include createdAt. Register and login apply lockout and CanSignInAsync before completing sign-in: register that cannot sign in still returns the credential id with no session, and login returns 401.

  • Passkey login requestOptions takes JSON { "email" } instead of ?username=
  • Unknown or empty email still returns 200 usernameless options
  • MapPasskeyEndpoints fails fast at map time if the user store lacks passkey or email support
  • Signed-in add rejects a mismatched attestation user id and does not store it
  • Missing credentials on delete and rename return 404
  • Register and login apply lockout and CanSignInAsync before completing sign-in

Packages

  • AuthEndpoints 3.0.8
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3

v3.0.7

Hosts can redirect browser email confirmation to an SPA route with status and flow query params.

AuthEndpoints

Hosts can redirect browser email confirmation to an SPA route with status and flow query params. Set EmailConfirmation.ConfirmEmailRedirectUri to a rooted path or an absolute URI so browser GET confirm-email returns 302 with status and flow instead of the thank-you body or 401. Absolute URIs stay on AllowedRedirectOrigins. Unset hosts keep the existing text response.

  • Hosts can redirect browser email confirmation to an SPA route with status and flow query params
  • Absolute ConfirmEmailRedirectUri values stay on AllowedRedirectOrigins
  • Unset ConfirmEmailRedirectUri keeps the thank-you body or 401

Packages

  • AuthEndpoints 3.0.7
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3

v3.0.6

Simple JWT refresh rotation is atomic under concurrent requests.

AuthEndpoints

Simple JWT refresh rotation is atomic under concurrent requests. Concurrent refresh calls against the same live refresh cookie complete with a single successor.

  • Simple JWT refresh rotation is atomic under concurrent requests
  • Concurrent refresh of a live cookie does not issue a second live refresh cookie

Packages

  • AuthEndpoints 3.0.6
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3

v3.0.5

Passwordless passkey register sends confirmation email; register creates only new accounts.

AuthEndpoints

Passwordless passkey register sends the same confirmation email as password register after a successful account create. Register only creates a new account: the attested user id must be new. Signed-in POST /passkeys/ still adds passkeys to existing accounts.

  • Confirmation email is sent after passwordless register creates a user
  • Passwordless register requires a new attested user id
  • Existing accounts still add passkeys via signed-in POST /passkeys/

Packages

  • AuthEndpoints 3.0.5
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3

v3.0.4

Optional factory for the user id minted during passwordless passkey registration.

AuthEndpoints

Passwordless passkey registration still mints Guid.NewGuid() (UUID v4) by default. Apps can register IPasskeyUserIdFactory (or AddPasskeyUserIdFactory) to choose a different user id on RegisterOptions / Register. Cookie and Identity bearer facades are unchanged.

  • Default remains Guid.NewGuid().ToString() when no factory is registered
  • Passwordless register still supports only string and Guid Identity keys

Packages

  • AuthEndpoints 3.0.4
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3

v3.0.3

Identity bearer facade for native and mobile clients.

AuthEndpoints

Adds Identity bearer sign-in as a SignIn choice on the existing AddAuthEndpoints / MapAuthEndpoints facade, built from the existing management, bearer, passkey, and optional JWT modules.

  • AuthEndpointsSignIn.IdentityBearer maps Identity Login (JSON access and refresh tokens) at IdentityPath
  • Cookie default (AddAuthEndpoints / MapAuthEndpoints with SignIn = Cookie) is unchanged

Packages

  • AuthEndpoints 3.0.3
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3

v3.0.1

Passkey register and login honor CanSignInAsync / confirmed-account policy.

AuthEndpoints

Patch release on 3.0.0. Passkey register and login now call Identity CanSignInAsync before establishing a session or issuing tokens, so confirmed-account (and other Identity sign-in) policy matches password and OAuth.

  • Unconfirmed register still returns the new credential without a session
  • Unconfirmed login returns 401, same shape as Identity login

Packages

  • AuthEndpoints 3.0.1
  • AuthEndpoints.External.OAuth unchanged at 3.0.0-preview.3
Preview

AuthEndpoints.External.OAuth 3.0.0-preview.3

Retarget the preview OAuth package to depend on stable AuthEndpoints 3.0.0.

AuthEndpoints.External.OAuth

  • Bump to 3.0.0-preview.3 so the packed nupkg depends on AuthEndpoints 3.0.0 (published 3.0.0-preview.2 still depends on 3.0.0-rc.2)
  • No OAuth feature changes; the package remains preview and is not part of the core 3.0 GA

v3.0.0

First stable 3.0 release — opinionated facade, cookie / bearer / JWT, passkeys, 2FA, and ReAuth on .NET 10.

AuthEndpoints

3.0 is the first stable release of the rewritten Identity auth stack. Last feature work was rc.4 (pluggable passkey sign-in); this cut is version and docs only.

  • Opinionated facade: AddAuthEndpoints / UseAuthEndpoints / MapAuthEndpoints (cookie Identity + passkeys by default; JWT opt-in)
  • Sign-in stacks you choose: cookie sessions, Identity bearer tokens, or Simple JWT (hashed refresh tokens, production issuer/audience/key validation)
  • Passkeys (WebAuthn) for passwordless register and login, including pluggable IPasskeySignInCompleter<TUser> (IdentityPasskeySignInCompleter and JwtPasskeySignInCompleter)
  • Account lifecycle: register, confirm email, forgot/reset password, manage info and 2FA
  • Step-up ReAuth for sensitive manage and passkey mutations
  • Roles-aware AddAuthEndpoints<TUser, TRole, TContext> so Identity IRoleStore registers correctly
  • .NET 10 (net10.0)

Packages

  • AuthEndpoints 3.0.0
  • AuthEndpoints.External.OAuth remains a separate preview package (3.0.0-preview.3, retargeted at this core)
RC

v3.0.0-rc.4

Pluggable passkey sign-in completer with Simple JWT support.

AuthEndpoints

  • Added IPasskeySignInCompleter<TUser> so passkey register/login completion is pluggable (same idea as External.OAuth completers)
  • Default IdentityPasskeySignInCompleter preserves cookie / Identity bearer scheme selection via useCookies / useSessionCookies
  • Added JwtPasskeySignInCompleter for Simple JWT access token + refresh cookie after passwordless register/login
  • Added AddPasskeyEndpoints<TUser>() and AddPasskeySignInCompleter<TUser, TCompleter>(); facade registers the generic passkey DI overload

Packages

  • AuthEndpoints 3.0.0-rc.4
  • AuthEndpoints.External.OAuth (unchanged)
Preview

AuthEndpoints.External.OAuth 3.0.0-preview.2

Production hardening — verified email, safer linking, error redirects, JWT completer, account link/unlink.

AuthEndpoints.External.OAuth

  • Require verified email by default; auto-link by email only when verified
  • Clear Identity.External cookie after successful sign-in / link
  • Stricter returnUrl (relative-only by default; optional origin allowlist)
  • Options validation for External settings and provider ClientId/Secret
  • Browser error redirects to ErrorPath (JSON Problem when client prefers JSON)
  • AddLoginRateLimiting registered from AddExternalAuthEndpoints
  • JwtExternalLoginCompleter for JWT refresh-cookie completion
  • MapExternalAccountEndpoints for list / link / unlink while signed in
RC

v3.0.0-rc.3

Roles-aware AddAuthEndpoints overload and public login rate-limiting API.

AuthEndpoints

  • Added AddAuthEndpoints<TUser, TRole, TContext> so Identity roles register IRoleStore correctly (no second AddEntityFrameworkStores after AddRoles)
  • Made AddLoginRateLimiting / AddIdentityEndpointRateLimiting public for compose scenarios (e.g. AuthEndpoints.External.OAuth)

Packages

  • AuthEndpoints 3.0.0-rc.3
  • AuthEndpoints.External.OAuth (unchanged) 3.0.0-preview.2 — requires AuthEndpoints rc.3+ for AddLoginRateLimiting
Preview

AuthEndpoints.External.OAuth 3.0.0-preview.1

First preview of modular GitHub/Google OAuth endpoints.

AuthEndpoints.External.OAuth

  • Added AuthEndpoints.External.OAuth as a separate preview NuGet package
  • Shared Core: AddExternalAuthEndpoints, provisioning service, pluggable cookie completer, shared login/callback handlers
  • GitHub and Google provider modules (AddGitHub / MapGitHubAuthEndpoints, AddGoogle / MapGoogleAuthEndpoints)
  • Default completion issues an Identity application cookie; AddCompleter<T> for future JWT (or other) modes
  • Compose-only — not wired into the AddAuthEndpoints facade
RC

v3.0.0-rc.2

Split Identity management from sign-in and harden JWT defaults.

Changed

  • Split Identity management from sign-in so hosts can compose cookie, bearer, or JWT stacks independently
  • Hardened JWT defaults (hashed refresh tokens, production issuer/audience/key validation)
RC

v3.0.0-rc.1

Identity/Passkey hardening and the opinionated AddAuthEndpoints facade.

Added

  • Opinionated facade: AddAuthEndpoints / UseAuthEndpoints / MapAuthEndpoints
  • Identity cookie and bearer endpoint integration tests

Changed

  • Hardened Identity and Passkey flows for the 3.0 release candidate
Alpha

3.0.0-alpha.11

Hardened JWT auth and finished passwordless PasskeyEndpoints.

Added

  • Passwordless PasskeyEndpoints (register / login / manage credentials)

Changed

  • Hardened JWT authentication and refresh-token handling
Alpha

v3.0.0-alpha.1

Cookie auth, Identity API endpoints, and step-up ReAuth — start of the 3.0 line.

Added

  • Cookie authentication endpoints
  • Leverage official ASP.NET Core Identity API endpoints
  • Step-up reauthentication via /confirmIdentity

Changed

  • Reorganized and simplified project structure
  • Breaking changes expected along the 3.0 alpha path