npm / better-auth
better-auth
What changed in better-auth 1, from its official release notes, upgrade guides and advisories. Also covers @better-auth/api-key, @better-auth/cimd, @better-auth/electron, @better-auth/expo, @better-auth/i18n, @better-auth/mcp, @better-auth/oauth-provider, @better-auth/passkey, @better-auth/redis-storage, @better-auth/scim, @better-auth/sso, @better-auth/stripe, auth. Sources checked 2026-11-30.
228 breaking239 security10 deprecations252 new APIs and options14 performance55 behavior and defaults8 tooling708 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbetter-auth 11514 changes
Breaking changes 228
Non-global IPv6 addresses outside
2000::/3are rejected as reserved rather than treated as public.OAuth resource servers return a DPoP insufficient_scope challenge, rather than Bearer, when a DPoP request lacks a required scope.
SCIM apps on adapters without native transactions no longer fail at startup; /scim/v2 requests return 501 Not Implemented, so provisioning requires an adapter with native transactions.
CLI prompts in CI or without a terminal now exit with code 2 and identify what is needed, such as
--yes; prompts go to stderr.Canceled or failed runs now use nonzero exit codes: cancellation exits with 130, and failures such as missing config or failed setup exit with 1.
Expo social sign-in now rejects authorization URLs without a state parameter when OAuth state is stored in a cookie.
Desktop authorization codes are now bound to the browser session that issued them.
Generic OAuth profiles are now bound to the ID token subject.
Pending invitations are limited to members who can manage them.
Sign-up and sign-in reject phoneNumber in the request, and social profiles no longer set unverified numbers, preventing unverified phone numbers from being stored.
Sign-up and update-user requests no longer set this field; server code using
auth.api.updateUsermust write it through the database adapter instead.The
/admin/update-userendpoint now requires this permission to change phone numbers; addset-phoneto custom access control statements.userVerification: "required"is now enforced for authentication as well as registration.The admin update-user endpoint rejects data.id with a 400 error instead of attempting to change the user's primary key.
Type declarations no longer list type-only exports as values, so value imports fail type checking instead of at runtime.
Sign-in now rejects ID tokens when the provider has no client ID because their audience cannot be checked.
ID tokens missing exp or iat are now rejected.
JWTs and session cookie-cache JWTs are verified using the stored key's algorithm rather than the token header's; signing or verifying without an issuer or audience now warns.
OAuth callbacks through the proxy now run the standard callback checks, including issuer and ID token nonce validation.
Sign-in now rejects ID tokens missing exp or iat and providers with an empty client ID, matching social sign-in.
The function now accepts only OAuth access tokens and rejects JWT plugin session JWTs, even when issuer and audience match.
Inferred output schema types no longer include custom fields that are not returned.
OIDC SSO providers whose configured issuer does not match discovery are rejected to prevent later sign-in failures.
Passwords exceeding this limit are rejected with PASSWORD_TOO_LONG before hashing or verification.
Adds schema diagnostics and blocks migrations when required columns that Better Auth never writes need manual repair.
Schema validation now runs during initialization by default, including in production, and authentication requests are rejected when mismatches are detected.
Client types with more plugins are no longer assignable to types declaring fewer plugins.
Accounts are keyed by trusted issuer and account ID and now require
Account.issuer; update provider identity reads and SSO configuration, then apply the account-identity backfill.Accounts are keyed by issuer and accountId, and Account.issuer is now required; existing account identity data needs a backfill.
Read provider identity from accountInfo.account.accountId following the account identity change.
ID tokens now carry acr: "0", and discovery advertises only "0".
Database joins moved from
experimental.joinsto the stableadvanced.database.joinsoption; regenerate Drizzle or Prisma schemas to include required relations.Database joins moved from experimental to the stable advanced.database.joins option; regenerate Drizzle and Prisma schemas to include required relations.
With dynamic baseURL, the auth origin is resolved from Host by default; enable trustedProxyHeaders when the public hostname is available only through x-forwarded-host.
The option now defaults to
false; setsaml.allowIdpInitiated: trueto continue accepting unsolicited SAML responses.OAuth callbacks now use this route.
MCP OAuth client metadata now requires
applicationTypeand nullableclientDiscoveryId; deduplicate client-resource links before adding the compound unique index, and remove legacy columns.OAuth client registration schema now requires an
applicationTypecolumn; migrate and drop the legacytypeandpubliccolumns.The Electron sign-in flow enforces S256 PKCE and hardened custom-scheme origin checks; upgrade client and server together and add the app scheme to trustedOrigins.
The MCP plugin moved into its own package; install it and @better-auth/cimd, add the required jwt() plugin, and migrate the documented API and schema changes.
Use @better-auth/oauth-provider for OIDC authorization-server integrations previously using oidcProvider.
Captcha endpoint entries must match full auth paths; use explicit wildcards instead of partial paths.
Authorization requests using the
claimsparameter must include theopenidscope.Replaced by per-client clientCredentialsScopes.
Replaces clientCredentialGrantDefaultScopes with per-client clientCredentialsScopes.
Replace
clientCredentialGrantDefaultScopeswith per-clientclientCredentialsScopesand backfill clients with audited machine scopes.OAuth client registration schema adds a nullable
clientDiscoveryIdcolumn; migrate and drop the legacytypeandpubliccolumns.The code_challenge_method parameter is removed from the Electron sign-in flow.
Custom rate-limit storage makes one
consumedecision per request.Custom adapters must implement native
consumeOne; read-then-delete fallbacks are removed to prevent concurrent requests racing past single-use guards.customAccessTokenClaims now receives a resources array instead of a resource string.
Custom ID token claim sources can no longer set reserved OIDC protocol claims; use namespaced custom claims instead.
Device flow endpoints enforce RFC 8628 request cardinality and client authentication.
A unique lookup index was added; resolve duplicates before migration, and use bounded strings on MySQL and SQL Server.
The disableOriginOverride option is removed from the Electron sign-in flow.
The response now includes a method discriminant, and OTP enrollment uses method: "otp" and requires otpOptions.sendOTP.
The genericOAuthClient() API is dropped.
Drop this client plugin when migrating generic OAuth to the first-class social provider.
Now returns a promise because Expo secure storage uses async access.
Per-issuance ID token claims can no longer set reserved OIDC protocol claims; use namespaced custom claims instead.
Custom adapters must implement native
incrementOne; read-then-update fallbacks are removed to prevent concurrent requests racing past rate-limit guards.Removed in favor of OIDC discovery when migrating to the first-class social provider.
The generic OAuth issuer option is removed in favor of OIDC discovery.
Use linkSocial() in place of oauth2.link() for linking a social account.
Remove mapping.id from SSO configurations.
Authorization requests now enforce max_age by requiring reauthentication when the user's authentication is too old; auth_time reflects the fresh login.
mcp()requires an explicit resource identifier; replacevalidAudienceswithresourcesand generate and apply the migration.mcp() no longer enables unauthenticated dynamic client registration; compose it with cimd() or explicitly enable both DCR flags.
Pass method: "otp" to enroll with OTP; the enableTwoFactor response also uses method to discriminate OTP and TOTP results.
Microsoft Entra accounts are identified by the stable oid claim; migrate existing rows created from sub, and tokens without a valid oid are rejected.
Client registration and metadata were aligned with MCP authorization 2026-07-28; migration adds applicationType and clientDiscoveryId and removes legacy columns.
The OAuth integration replaces the optional resource column with oauthClientId and resources; regenerate and apply the schema.
Validation failures return RFC-compliant OAuth error envelopes; authorization errors redirect to a registered trusted client URI with state and iss.
OAuth protected resources are modeled explicitly with per-resource TTLs, scopes, claims, and signing pins.
Token and refresh requests may only narrow the authorization's resource; broader requests return invalid_target.
Replace oauth2.link() with linkSocial().
Custom authentication strategies must return { clientId, confirmation? } instead of a client record.
OAuth device grant ownership is separated into oauthDeviceAuthorization(); the integration schema also replaces resource with oauthClientId and resources.
Ending a session cuts off connected apps' API access; inactive-session access tokens are inactive and /oauth2/userinfo rejects them.
MCP options are no longer nested under oidcConfig; pass them as flat mcp options.
The deprecated oidcProvider plugin was removed; move OIDC authorization-server integrations to @better-auth/oauth-provider.
Google One Tap requires a Google client ID to verify ID tokens; configure oneTap({ clientId }) or socialProviders.google.clientId.
The
eventcallback parameter is required and always supplied; remove undefined guards.PKCE now defaults to true for the generic OAuth provider.
PKCE now defaults to true for the first-class social provider.
Remove grantType from provider.authenticateClient(...).
The requireIssuerValidation option is removed in favor of OIDC discovery.
New name for the MCP authentication helper, replacing withMcpAuth.
SAML provider APIs always return certificates as an array; registration also rejects configurations without a signing-certificate source.
SCIM configuration, client APIs, database schema, and Group model are replaced; provisioning state cannot migrate in place and requires a full directory reprovision.
Custom Expo storage implementations must provide both synchronous and asynchronous SecureStore methods.
Replace signIn.oauth2({ providerId }) with signIn.social({ provider }) after the generic OAuth plugin became a first-class social provider.
Replaced
signIn.oauth2({ providerId })withsignIn.social({ provider })as generic OAuth became a first-class social provider with OAuth 2.1 defaults.Use signIn.social({ provider }) in place of signIn.oauth2({ providerId }) for generic OAuth sign-in.
The silenceWarnings option and the well-known endpoint warnings it suppressed were removed.
Read SSO metadata from
source.ssoinstead ofsource.oauth; handlesource.methodvaluessso-oidcandsso-saml.Use the consolidated SAML ACS endpoint;
/sso/saml2/callback/:providerIdis removed andcallbackUrlis now only the post-auth redirect.Confidential clients must use their registered token_endpoint_auth_method.
Electron sign-in now enforces S256 PKCE and hardened custom-scheme origin checks; add your app's scheme to trustedOrigins. Host-bearing custom-scheme entries match that host exactly.
Custom providers replace the removed
verifyIdTokenmethod with anidTokenconfig carrying a JWKS source, issuer, and audience.Custom UpstreamProvider implementations replace verifyIdToken with an idToken config carrying a JWKS source, issuer, and audience.
validAudiences is removed; move resource identifiers into resources and link restricted clients through oauthClientResource.
Custom UpstreamProvider implementations must replace verifyIdToken with an idToken config.
Rename withMcpAuth to requireMcpAuth.
Assignment now requires both a verified provider domain and a verified stored user email, preventing social sign-in from joining an organization based only on a provider's domain claim.
Server-side OAuth requests now refuse redirect responses instead of following them.
DNS proof is required for every domain listed on a provider.
Rejects expired access tokens and requires the offline_access scope for refresh token usage.
Rejects cross-site logout requests carrying only a session cookie without a valid id_token_hint.
Enforces tenant restrictions and rejects tokens issued for other applications across Google One Tap, Microsoft Entra ID, SSO, WeChat, and Reddit sign-in.
The Expo authorization proxy rejects redirect and callback targets that are not in
trustedOrigins.Treats only boolean true or the string "true" as a verified email and rejects the string "false" as unverified.
Rejects unknown or malformed role values by validating them against configured static and dynamic roles.
The token endpoint enforces per-client grant types, preventing clients registered only for authorization_code from requesting client_credentials tokens.
Sign-in is rejected when no account ID can be resolved from the provider response, preventing account collisions for providers that omit sub.
Server-side requests to token, userinfo, and JWKS endpoints reject addresses that are not publicly routable, protecting against SSRF.
The operation deprovisions the user rather than deleting the global account.
Electron auth transfers require S256 PKCE at minting and exchange, rejecting plain and missing code_challenge_method values.
Introspection requires an azp claim and a valid client on JWT access tokens, preventing session JWTs from being reported as active access tokens.
The endpoint rejects plugin-managed active organization, active team, and impersonation fields with a 400 error; use their dedicated endpoints to change them.
Validation works on all supported runtimes and rejects URIs containing a fragment component, as required by RFC 6749 §3.1.2.
Rate-limited responses now return HTTP 429 instead of 401, allowing clients to distinguish throttling from authentication failures.
The oidc-provider and mcp plugins now require this for confidential clients on refresh token grants.
The adapter primitive was renamed from claimOne to consumeOne for atomically consuming database rows without race conditions.
It now rejects providerId values that collide with built-in account providers, preventing tokens from authenticating against unintended accounts.
The invitation email verification gate now also applies when retrieving an invitation.
The invitation email verification gate now also applies when listing a user's invitations.
Linking an OAuth identity to a local account now requires a verified local email.
A unique constraint was added to the refresh token field.
The oidc-provider and mcp plugins now reject incomplete PKCE parameters.
This option is now enabled by default to prevent invitation takeover.
Registration now requires an org admin or owner role, preventing organization members from registering providers.
Renamed the parameter from accountId to id to reflect that the query uses the primary key.
setActiveTeam now only accepts teams from the currently active organization.
Two-factor authentication challenges are again limited to credential sign-in paths; non-credential sign-in flows no longer trigger a challenge.
Two-factor authentication enforcement now triggers on all sign-in paths, including magic-link, OAuth, passkey, email-OTP, and SIWE.
Dynamic client registration now rejects skip_consent at the schema level.
Duplicate email now throws when autoSignIn is false and email verification is not required.
InResponseTo validation is enabled by default for SP-initiated SAML flows; set it to false to restore the previous behavior.
generateId: "uuid" now takes precedence over an adapter customIdGenerator.
Password reset requests now pass through origin check middleware.
Authorization is now enforced on SCIM management endpoints.
Phone sendOTP failures are now rethrown instead of silently swallowed.
freshAge is now calculated from session creation time instead of update time; set session.freshAge to 0 to disable the check.
updateUser no longer overwrites unrelated username fields and now enforces username uniqueness.
The accountInfo endpoint uses accountId instead of id.
Removes the deprecated type; use DBAdapter instead.
Use the value "serial" as the replacement for advanced.database.useNumberId.
Removes this deprecated option; use advanced.database.generateId: "serial" instead.
Replaces the ApiKey table's userId field.
Renames the ApiKey table field userId to referenceId.
The client SDK owner identifier has been renamed to apiKey.referenceId.
Removes the deprecated client type; use ClientAtomListener instead.
Removes this export; use the testUtils plugin instead.
The API key plugin has moved to a separate package that must be installed separately.
Removes the barrel export in favor of individual utility subpath exports.
Adds the subpath export for defineErrorCodes.
Adds the subpath export for generateId.
Adds the subpath export for safeJSONParse.
The Drizzle adapter is available as a separately installable package for smaller bundles and independent adapter versioning.
The in-memory adapter is available as a separately installable package for smaller bundles and independent adapter versioning.
The MongoDB adapter is available as a separately installable package for smaller bundles and independent adapter versioning.
The Prisma adapter is available as a separately installable package for smaller bundles and independent adapter versioning.
Redis secondary storage is available as a separate package.
Removes the deprecated type; use BetterAuthClientOptions instead.
Removes the deprecated API; use createAdapterFactory instead.
create.after, update.after, and delete.after now run after the transaction commits; plugins needing atomic writes should use the adapter during the main operation.
Now returns RawError objects containing code and message instead of plain strings.
Plugin error codes now expect Record<string, RawError> rather than Record<string, string>.
Removes this endpoint; use the standard password reset flow instead.
Moves from the better-auth root export to better-auth/db/migration to avoid bundling extra dependencies.
Removes InferSession; use the generic Session type instead.
Removes InferUser; use the generic User type instead.
Removes the deprecated helper export from better-auth/types/helper; import it from @better-auth/core.
Enforces HTTPS for redirect URIs, allowing HTTP only for localhost.
The OAuth 2.1 Provider replaces the previous OIDC Provider plugin, which is planned for deprecation in a future release.
Removes the deprecated hook; use afterEmailVerification instead.
Renames the Organization permission field to permissions.
Default rate limits are stricter for password reset endpoints.
The callback's first argument is now referenceId instead of userId.
Default rate limits are stricter for phone number verification endpoints.
Default rules limit sign-in and sign-up to 3 requests per 10 seconds, and password reset and OTP to 3 requests per 60 seconds.
Removes the id field from sessions in secondary storage; plugins that read it must update.
Removes the deprecated API; use sendChangeEmailConfirmation instead.
Use the generic Session type instead of the removed InferSession type.
Removes the deprecated client type; use ClientStore instead.
Removes the deprecated type; use DBTransactionAdapter instead.
Use the generic User type instead of the removed InferUser type.
Redirect URIs are required to use HTTPS.
Roles assigned to members cannot be deleted.
The continue and consent endpoints return url instead of uri.
SAML responses containing multiple assertions are rejected.
Corrects the accountLinking default to true.
Domain verification is now enforced when assigning an organization by domain.
Deprecated SAML signature and digest algorithms are rejected.
SAML assertions are now enforced as one-time use.
SAML sign-in now enforces the trusted provider check.
Password length is now validated during password reset.
Admins can no longer be impersonated by default.
The user-agent is no longer applied by default.
The passkey generate-authenticate-options endpoint changes from POST to GET.
Adapters are expected to implement the transaction function.
The unimplemented autoCreateOnSignUp option is removed.
Uses JWE for the cookie cache by default.
Default values are no longer applied during find calls.
Generated Drizzle schemas for SQLite use timestamps, and DefaultNow is deprecated.
The email verification check now occurs after the password check.
The package is ESM-only, which affects how projects import it.
An error is thrown if an event cannot be constructed.
Removes the deprecated forgetPassword endpoints.
The getCheckoutSessionParams typing was updated to remove TypeScript error suppression.
isAnonymous now defaults to false instead of null.
Issuing an API key no longer creates a mock session by default.
OAuth redirects to GET when the initiating method is POST.
OIDC consent requirements are enforced according to the specification, and consent is requested when scopes change.
Deleting a member from an organization also removes them from teams.
Creating or updating an organization prevents empty names and slugs, and organization updates prevent duplicate slugs.
Drizzle schema generation replaces pgEnum with a text enum type.
An error is thrown if query.referenceId is defined.
The admin API applies stricter request body validation when setting a user's password.
The multi-session signout hook rejects cookies without valid signatures.
Removes the deprecated ssoClient export from the client plugin.
Transactions are disabled by default in the create-adapter package.
The /update-user endpoint no longer allows updating a phone number.
The OIDC provider represents updated_at as a UNIX numeric timestamp.
viewBackupCodes returns a parsed array.
URLs without a protocol no longer satisfy a wildcard origin.
The async local storage export was removed.
Security 239
Replay reservations last through the full accepted window, preventing proof reuse in its final second.
Kakao sign-in now uses PKCE by sending
code_challengeandcode_verifier.Refreshed tokens no longer carry a
sidfor a session that has already ended.Rejects an expired challenge before sending an OTP or counting a failed attempt.
Endpoints accepting DPoP-bound tokens should call enforceDpopBinding from better-auth/oauth2 with the request and a shared replay store to enforce DPoP binding.
OAuth token requests that fail PKCE, redirect_uri, resource, or DPoP validation no longer consume the authorization or device code.
Cross-origin browser clients can read authentication challenges; CORS layers that set their own exposed headers must include WWW-Authenticate.
Revoking the current session or deleting the user with a token now expires session cookies.
In-flight access tokens are revoked on adapters without foreign keys.
Token reuse that revokes an in-flight issuance now returns invalid_grant.
Consent denial redirects to the client only while the client is enabled and its redirect_uri remains valid.
An optional headers input is available for refreshAccessToken; Generic OAuth also sends authorizationHeaders on access token refresh and avoids invalid combined client-authentication headers.
Signed responses resubmitted with assertion IDs written as XML character references are rejected under the specified SAML settings.
401 responses no longer expose internal error messages; those errors are logged on the server instead.
With allowPublicClientPrelogin, the endpoint returns a client only when its client_id matches the signed oauth_query; otherwise it responds with 401 invalid_client.
SAML assertion validation now applies the default 5-minute saml.clockSkew to NotBefore and NotOnOrAfter checks in samlify.
Failed fallback join queries no longer print raw database errors, including SQL and bound values, to
console.errorin addition to the configured logger.With secondaryStorage and storeSessionInDatabase, revocation also covers sessions created while it is running, except sessions created by a session.delete.after hook.
Denying a device authorization request now rejects a revoked session that is still in the cookie cache.
Sessions created by this hook are no longer treated as revoked during revoke-all when using secondaryStorage with storeSessionInDatabase.
IP wildcard trusted origins with custom schemes no longer match hosts with out-of-range or zero-padded octets.
Email OTP now enforces the configured guess limit under concurrent requests.
Anonymous users are no longer linked during sign-in while a second factor is still pending.
The proxy no longer signs state the server did not issue or redirects to hosts that are not configured providers.
Email change codes are now bound to the requesting account.
Links are now tied to the account they were issued to, preventing them from working for another account.
String claims such as
"false"are no longer treated as verified during OAuth sign-in; Cognito and Microsoft Entra ID claims are also read correctly.MySQL with
generateId: "serial"no longer returns another request's record on connection pools.Extra whitespace in organization roles no longer allows them to pass role checks.
Set
originwhenrpIDis set and a wildcard inbaseURL.allowedHostscovers it, so the expected WebAuthn origin comes from server configuration rather than the request.Bulk revocation now ends sessions missing from cached lists, and sensitive authentication flows check the session store, preventing revoked sessions from remaining usable.
Sign-in no longer returns the internal auth context when the cookie is not a transfer request.
Wildcard trusted origins no longer match URLs outside the intended scheme, host, or path.
The Zoom provider now respects
disableSignUp,requireEmailVerification, andoverrideUserInfoOnSignIn.Organization and API key metadata, and OAuth proxy sign-ins, now handle a constructor field in additionalData without a prototype pollution error.
Error messages report the entry position instead of including the entry value.
Built-in social providers no longer follow HTTP redirects on token exchange, refresh, verification, and JWKS signing key requests.
The admin plugin rejects banned users when a session is created outside an endpoint.
The callbackURL is validated against trusted origins after replacing {CHECKOUT_SESSION_ID}, preventing redirects to untrusted origins via checkoutSessionId.
A third-argument cause option preserves the underlying error for server-side callers without exposing it in the response.
For ID token sign-in with a provider that has no clientId, set clientId to every client ID your apps sign in with so token audiences can be checked.
A custom Facebook getUserInfo no longer receives client-submitted access tokens issued to another Facebook app.
Fixed ID token signature and claim validation for Twitch and Paybin sign-in. Custom Paybin issuers must publish RS256 signing keys at the specified JWKS path.
Refetches for unknown key IDs are limited to protect servers from repeated requests.
Consent without a reference no longer overwrites or reuses consent for a different reference.
Fixed validation for token and UserInfo requests behind proxies that rewrite request URLs.
Resource identifiers are validated for
adminCreateOAuthResourceand configuredresources.Privilege checks for actions on existing OAuth clients include
clientId.Cookie security attributes are aligned with RFC 6265bis.
Expired or revoked customSession sessions no longer leave stale cookies, and session lookup errors are no longer treated as signed-out users.
Failed password resets no longer consume reset links or OTPs before the new password is saved.
The new password is no longer retained when database session revocation fails.
better-auth: OAuth state can be used as a Magic Link to sign in as another user
Fixes concurrent PostgreSQL requests exceeding database-backed rate limits.
ID-token sign-in now respects the social provider’s disableSignUp setting.
Fixes a critical account-takeover vulnerability. Servers sharing verification storage must be upgraded together; request new Magic Links and restart pending OAuth/SAML sign-ins. No database migration is required.
Prevents OAuth Proxy from accepting sign-in state as a provider profile. Upgrade all OAuth Proxy participants together.
Verifies signed authorization queries before rendering a custom consent page.
Fixed stale Expo secure-storage session data and corrupted cookies during concurrent updates.
Expo apps no longer send unauthenticated requests during interrupted cookie storage updates.
Improves PayPal authorization code and refresh token requests, including PKCE handling.
Uses OAuth-compliant Basic authentication and adds redirect protection for Reddit token requests.
Re-enrollment no longer replaces an active authenticator and its backup codes.
Validation now handles relative callback and redirect URLs with paths, queries, and fragments.
Signatures are validated on the raw assertion rather than trusting an already-parsed response; SP metadata signing policy and size limits are enforced.
The option now correctly controls whether the SP requires signed assertions, matching real-world IdP signing behavior.
IdP-initiated flows are supported through a secure server-side bounce.
Replayed authorization codes are rejected with
invalid_grant, and tokens issued from that code are revoked.Every OAuth response carrying credentials sends
Cache-Control: no-store.OAuth responses carrying credentials now send Cache-Control: no-store.
Metadata documents follow shared-cache freshness rules, fail closed when freshness is ambiguous, revalidate conditionally, and converge concurrent refreshes on one client-resource link.
A server-trusted OAuth state channel fixes anonymous account linking in in-app browsers.
Invalid tokens receive a
401 invalid_tokenchallenge.The single-use
jticheck is atomic across processes.Dynamic client registration can be protected using RFC 7591 initial access tokens.
A client presenting a refresh token issued to another client receives
invalid_grant.Authorization requests missing
response_typeredirect to the verified client redirect URI.SAML assertion signatures are verified directly; SP metadata receives the IdP metadata signing policy and size limit, and
wantAssertionsSignedcontrols signed assertions.No longer reveals whether an email is registered before the OTP is verified.
Deleting a user now also removes their sessions from secondary storage.
Google One Tap no longer creates new users when sign-up is disabled on the Google provider.
The endpoint includes no-store cache control headers to prevent stale session data from being served.
Magic-link and email-OTP send endpoints validate the Origin header on cookieless requests to prevent cross-origin abuse.
Two-factor authentication now has account-level verification lockout.
Better Auth: Account takeover via pre-account hijacking on magic-link and email-OTP sign-in
SCIM write-path operations are now properly scoped.
Email sign-up stores displayUsername fallbacks only when they pass username validation.
Validation is applied consistently across sign-in flows, including Google One Tap.
Profile callbacks that do not match an issued OAuth state are rejected, preventing session creation with stale state.
Fixed cancel, upgrade, restore, and billing portal actions that could act on the wrong organization.
User information is validated against the verified ID token subject.
Rate limits are enforced before plugin request handlers run.
IdP SLO POST URLs using non-http(s) schemes such as javascript: or data: are rejected.
Responses with an audience, recipient, or destination that does not match the configured Service Provider are rejected.
Admin permission changes and bans take effect immediately even when session cookie caching is enabled.
Sign-in rejects emails that already belong to another account, preventing one email from being attached to two accounts.
Deleting an SSO provider also removes linked accounts, preventing reuse by a later provider with the same ID.
TOTP and backup-code verification lock out after five wrong codes and return TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE.
Client IP resolution prevents X-Forwarded-For spoofing in multi-hop proxy chains.
The refresh cookie Max-Age is capped at expiresIn.
The plugin no longer leaks internal OAuth state keys into additionalData.
Prevents concurrent verification from reducing the remaining-uses count below zero or exceeding the rate limit.
Adds an optional method for custom storage backends to opt into strict rate-limit enforcement.
Adds an adapter method for atomic counter updates, enabling strict rate-limit and usage-counter enforcement under concurrent load.
Only act on sessions for which the caller holds a signed cookie, preventing unauthorized session manipulation.
Canonicalizes signed redirect parameters by key and value so CDN or proxy reordering does not break signature verification.
Rejects cross-purpose challenges so an authentication challenge cannot complete registration and vice versa.
Prevents concurrent requests from slipping past configured limits.
Assigns users without an email a non-routable placeholder address to prevent accidental matches with real mailboxes.
Adds an atomic increment method for strict rate-limit enforcement.
Adds atomic counter updates for strict rate-limit and usage-counter enforcement under concurrent load.
Concurrent verification no longer drives remaining uses below zero or exceeds the rate limit; secondary-storage-only counters remain best-effort.
API key updates fail when the caller's session has been revoked server-side instead of succeeding within the cookie-cache window.
Custom rate-limit storage may implement this optional method for strict enforcement; rate-limit handling also avoids concurrent limit bypass, unbounded in-memory growth, and stale database entries.
Counter updates on the memory, Kysely, Drizzle, Prisma, and MongoDB adapters are atomic on the default configuration, preventing rate-limit and API-key usage-limit race conditions.
Prevents duplicate account deletions from concurrent callback requests.
Rejects account deletion when the session has been revoked server-side; cookie-only session deployments are unaffected.
Prevents the same approved device code from being redeemed multiple times under concurrent polls.
Prevents concurrent exchange attempts from exchanging an authorization code for a session more than once.
Prevents concurrent requests from signing in multiple times or exceeding the attempt limit.
Returns null for expired sessions instead of treating stale signed cookies as live sessions.
Checks breached passwords on additional email-OTP and phone-number reset-password routes and admin password-setting routes.
Atomically records single-use markers so only one concurrent caller succeeds for replay-protected operations.
The configured team member cap is enforced on
addMemberandadd-team-member; rejectedaddMembercalls do not create organization members.Acts only on sessions for which the caller holds a signed cookie, preventing activation or revocation of other sessions.
Prevents one-time tokens from being redeemed multiple times under concurrent requests.
Rejects registration challenges used for authentication and vice versa, and fails when the target user cannot be resolved.
Prevents concurrent requests from using a password reset token to change a password more than once.
Prevents concurrent requests from signing in multiple times or exceeding the attempt limit.
Users without email receive an unverified non-routable
<id>@reddit.invalidaddress;mapProfileToUsercan provide a real email.Sets expiry only when a window first opens, preventing continued traffic from extending the window.
Holds under concurrent requests so a duplicate SAML assertion submission is not accepted more than once.
Uses constant-time comparison during request authentication, closing a timing side channel across all storage modes.
Adds atomic counter updates with conditional row guards for strict enforcement of rate limits and usage counters.
Prevents server-only endpoints from being accidentally exposed over HTTP.
Prevents Ethereum nonces from being accepted multiple times under concurrent sign-in requests.
Allows organization admins and owners to verify domains for SSO providers their organization owns, not only the original registering member.
Reuses email-matched customers only when verified, syncs status from successful checkout sessions, scopes cancellation and restoration to the target subscription, validates
returnUrlagainsttrustedOrigins, and checks all subscriptions on organization deletion.Expired challenges no longer complete login, and concurrent verifications no longer create duplicate sessions.
Prevents concurrent requests from signing in multiple times or exceeding the attempt limit.
The admin endpoint now enforces permissions on role, ban, and email fields and prevents data from overriding protected fields.
The endpoint verifies the session against the authoritative store with disableCookieCache: true, preventing revoked sessions from being accepted within the cookie-cache window.
Verification persists only fields it mutates, preventing concurrent disables, permission changes, or expiry updates from being reverted by an in-flight verification.
Session update and account token routes immediately reject deleted sessions when cookie cache is enabled alongside database or secondary storage.
Requested team IDs are validated to belong to the invitation's organization, preventing cross-organization team membership.
Token verification checks the configured app through debug_token, requiring is_valid, a matching app_id, and a client secret for direct sign-in.
Google hosted-domain enforcement now verifies the hd claim on the verified ID token and callback profile.
The cache is scoped per verification source and has a TTL, preventing key cross-contamination when verifying tokens against multiple issuers simultaneously.
Reddit no longer stores oauth_client_id as the user email; when no real email is provided, a synthetic per-user address is used.
ID token verification now checks the signature, issuer, audience, expiration, and nonce against PayPal's JWKS or client secret.
OAuth continuation derives post-login gate completion from a server-issued session marker instead of the client-submitted postLogin flag.
The endpoint trusts the account cookie only when its userId, providerId, and accountId match the resolved session user.
Requests are consumed atomically to prevent replay attacks on concurrent requests.
Verification now binds the signed message to server state before creating a session, rejecting signatures for a different message, nonce, or domain.
Provider IDs are isolated from the OAuth/social account-linking namespace, preventing unintended account linking when an SSO provider ID matches a trusted OAuth provider name.
Email sign-in and sign-up validate Origin and Referer against trustedOrigins even when requests carry no cookies.
The endpoint now properly enforces fresh-age session checks.
Prefers the
__Secure-prefixed cookie over a non-secure leftover so a stale cookie cannot shadow the current session.Prevents Google One Tap from authenticating the wrong local user when the presented Google account is linked to a different user.
Restores the normal emailed-invitation flow while enforcing stricter email verification for externally controlled or predictable invitation IDs.
Better Auth has stored XSS in the auth-server origin via javascript: redirect_uri in oidc-provider and mcp
Google One Tap now resolves identity through the shared OAuth path when the presented Google account is already linked to a different local user.
Ambiguous helper methods no longer silently match the wrong account or wipe all sessions for a user.
Dynamic client registration now applies the clientPrivileges create check.
Logout handlers now match the session by token rather than ID, preventing users from remaining signed in after Single Logout.
A high-severity XML injection vulnerability in signed SAML assertions was fixed by updating samlify.
Expired magic-link tokens and OAuth authorization codes are reliably rejected, with corrected error codes.
Returns an error if
emailVerification.sendVerificationEmailis missing; verify-email links URL-encodecallbackURL.The admin endpoint now validates usernames.
Challenges are consumed atomically to prevent replay attacks; failed registration and authentication error status codes are improved.
Hidden from
.well-knownmetadata unless dynamic client registration is enabled.Rejects empty action lists and correctly evaluates
ORconditions on unknown resources.Fixes a cookie leak that allowed
session_tokenandsession_datato be captured and replayed to bypass 2FA when cookie caching is enabled.Returns proper unauthorized errors for invalid token verification failures.
Better Auth has insecure cryptographic defaults in oidcProvider: alg=none advertised and plain PKCE accepted by default
@better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitive
The oidc-provider and mcp plugins now compare client secrets in constant time.
Pending codes are bound to the verifying session, preventing authenticated users from approving or denying another user's device code.
Concurrent requests can no longer mint multiple sessions from the same single-use token.
Concurrent requests can no longer fork refresh token families.
User-supplied endpoint URLs are validated against a public-routable host allowlist during provider registration and update.
Their TypeScript statement types now expose only their configured permissions.
Session cleanup now runs when admin, anonymous, or SCIM operations delete a user.
The oidc-provider and mcp plugins no longer advertise the none signing algorithm, following OAuth 2.1.
api.verifyApiKey now validates the key's configId against the request body.
Email enumeration protection now applies when emailAndPassword.autoSignIn is false.
Parameters no longer override free trial and internal metadata, preventing hidden trial periods and duplicate subscription rows on webhook.
OAuth callbacks no longer accept a missing provider account ID that could link accounts under an undefined id.
Consent continuations now complete after a forced login, and prompt=login is honored after consent continuation to prevent session bypass.
Fixed authorization flows that do not include a state parameter.
Host classification is unified and loopback bypass vectors across packages are closed.
Fixed an authorization bypass that let unprivileged authenticated users create OAuth clients when deployments relied on clientPrivileges to restrict client creation.
Authorization code validation was hardened.
Hardened dynamic baseURL resolution for direct auth.api calls and plugin metadata helpers.
Fixed a prototype pollution vulnerability when merging user-supplied metadata in the Stripe plugin.
Better Auth: OAuth callback accepts mismatched
statewhen cookie-backed state storage is used without PKCEOAuth state verification now checks the cookie-stored nonce, preventing CSRF.
Better Auth: OAuth refresh-token rotation forks the token family on concurrent redemption
Database fallback no longer restores revoked sessions.
OAuth proxy adds a dedicated secret option to reduce shared key exposure.
The oidc-provider validates redirect_uri when
prompt=none.Lets the magic-link plugin limit verification attempts.
Always returns { status: true } and simulates token generation to mitigate email enumeration through timing.
CSRF validation and origin checks are separated for more granular request validation.
Lets users change their email via OTP verification, optionally confirming the current email for added security.
Prevents user enumeration when sign-up is disabled.
Checks all user subscriptions before granting a free trial to prevent trial abuse.
Expired organization invites are rejected.
Atomically invalidates OTPs on use to prevent reuse through a race condition.
Hardens SAML ACS error redirects to prevent open redirects.
When email verification is required, sign-up no longer reveals whether an account already exists.
Verification identifiers can be stored hashed, with per-identifier overrides for choosing plain or hashed storage.
The aud claim is validated in OpenID Connect ID tokens.
Adds user ID checks to device authorization.
Handles trusted-device expiration server-side and makes maxAge configurable.
Better Auth: Rate limiter keys IPv6 addresses individually and is bypassable via prefix rotation
Adds a userId check to /has-permission.
Prevents trial abuse by checking all user subscriptions.
XML parser hardening adds configurable size limits.
Better Auth Has Two-Factor Authentication Bypass via Premature Session Caching (session.cookieCache)
The inviteMember endpoint validates that the specified role exists.
SAML cryptographic algorithms are validated during the initial phase.
Trusted origins are respected when the base URL is inferred and are resolved correctly.
Adds role permissions for user updates and validates role changes.
Checks whether metadata is enabled before allowing updates through the API key update endpoint.
Adds InResponseTo validation for SSO.
Enforces nonce validation.
Removes the SAML signature validation bypass.
Verification tokens are now always removed after successful verification.
Safely parses provider configurations on registration.
Clears the admin session cookie when impersonation stops.
Better Auth affected by external request basePath modification DoS
Admin role updates are checked against configured roles to prevent assigning a role that does not exist.
Equality checks use constant-time comparison.
User code input is sanitized when approving a device.
Email OTP behavior prevents user enumeration.
OTP comparisons use a constant-time equality check.
The SAML callback respects disableImplicitSignUp.
Two-factor endpoints avoid using GET requests with a body.
Deprecations 10
The Cloudflare provider deprecates tokenEndpointAuthMethod, but continues to support it.
The legacy endpoint is deprecated and will be removed in the next minor release.
A warning is now emitted when the cookie plugin is placed last in the plugins array.
The oidc-provider plugin is deprecated in favor of @better-auth/oauth-provider.
Warns when an old @better-auth/cli is used with better-auth v1.5.x+.
Adds a deprecated options alias for backward compatibility.
Marks this endpoint as deprecated.
The SSO
trustEmailVerifiedoption is deprecated.Deprecates the type of options.advanced.generateId.
The old sso plugin export is marked deprecated.
New APIs and options 252
Allows
private_key_jwtclients with slight clock drift to avoid failing token exchange.Social providers can store custom values on the provider account at sign-in.
ID tokens from Kakao's native SDKs can be passed to
signIn.social.Adds optional
limit,offset, andsortDirectionfields for pagination and atotalcount in the response.Set this value if
oauthProviderResourceClient(auth)should keep fetching signing keys over HTTP.Use a shared replay store in multi-instance or serverless deployments; the default is in-memory.
Set jwksUrl if requireMcpAuth should keep fetching signing keys over HTTP.
An optional headers input is available for refreshAccessTokenRequest; Generic OAuth also sends authorizationHeaders on access token refresh and avoids invalid combined client-authentication headers.
The Cloudflare provider adds tokenEndpointAuth: { method } as an option.
The Vercel social provider adds token endpoint authentication options, including dynamic OIDC tokens and private key JWT client assertions, without replacing its built-in sign-in flow.
Added optional self-service signing key rotation for
private_key_jwtclients.Added
isContinuationso users can complete authorization after selecting an organization.Client registration can link protected resources.
OAuth clients can be paused and resumed through
adminUpdateOAuthClient.Adds optional redirect URI validation for trusted deployments with dynamic OAuth redirect URIs.
Added a read-only command to validate your configured adapter schema on demand.
Added a read-only command to validate your configured adapter schema on demand.
Added a function that receives the banned user, allowing sign-in errors to include details such as the ban reason.
Added Vercel BotID as a captcha provider for protected authentication routes.
Added support for database.schemaName with direct PostgreSQL connections.
Added a per-auth-instance option to disable OpenTelemetry span creation.
Cloudflare is now a built-in social provider with client-secret and PKCE support.
Codex is now a supported target for configuring the Better Auth documentation MCP server.
Adds custom token endpoint authentication strategies for providers with non-standard request parameters.
Adds a way to check passwords against Have I Been Pwned in custom server-side flows.
A transaction-safe API is available for authenticating provisioned users.
ssoProvidersupportsadditionalFields.Per-request
additionalParamsare supported acrosssignIn.social,linkSocial, andsignIn.sso.Per-request additionalParams are available across signIn.social, linkSocial, and signIn.sso.
An Auth instance can now be fetched directly.
Clients can register backchannel_logout_uri to receive notifications when a session ends.
The Client ID Metadata Document plugin is available as @better-auth/cimd.
Added built-in translations for 22 languages.
The Microsoft Entra ID social provider now supports clientAssertion.
Plugin database schemas support compound table indexes.
A server-only API is available for custom phone OTP flows.
Added a command for creating an initial admin user.
Optional passkey setting that signs the user in after successful passkey registration.
DPoP sender-constrained access tokens (RFC 9449) are supported.
hydrateSession makes useSession return server-fetched data on the first render.
A username option is available to make usernames immutable.
The Google provider supports the
includeGrantedScopesoption.The listUserTeams API now accepts userId and organizationId.
Per-request
loginHintis supported acrosssignIn.social,linkSocial, andsignIn.sso.Per-request loginHint is available across signIn.social, linkSocial, and signIn.sso.
An optional SCIM-owned connection and credential catalog lets trusted server code create runtime tenant connections and issue, rotate, and revoke bearer credentials through server-only auth.api methods.
The OAuth device authorization grant (RFC 8628) is now supported.
An extension surface is available for registering grants, client authentication methods, discovery metadata, and claim contributors.
Token endpoint client authentication can now be configured across the OAuth stack.
Use oauthClientResource to link restricted OAuth clients to resources.
organization.getOrganization() supports metadata-only fetches.
private_key_jwt client authentication is supported for token endpoint requests.
Forward extra parameters on generic OAuth token refresh using refreshTokenParams.
Added an entry point for projects using Drizzle Relations v2.
Social sign-in can require email verification on a per-provider basis.
Social sign-in now supports a per-provider requireEmailVerification option.
Generates the Drizzle schema inside a
pgSchemanamespace.SCIM supports the Enterprise User extension and standard User attributes for interoperability conformance.
SCIM adds durable Group resources with connection-scoped membership and lifecycle endpoints.
The session cookie cache supports JWKS-backed asymmetric JWTs.
The issuing sessionId is exposed to id_token claim contributors.
A validation gate can reject an identity before a user is created or linked.
Add a user.validateUserInfo gate to reject an identity before a user is created or linked.
Requested UserInfo claims are honored through a claim registry.
An option can disable OpenTelemetry span creation for individual auth instances.
Adds a utility for creating stable, namespaced placeholder emails on the reserved
placeholder.invaliddomain.The last-login-method plugin adds a beforeStoreCookie option for GDPR compliance.
verifyIdToken accepts request context as a third argument so custom ID token verifiers can read request headers.
Added Yandex as a social OAuth provider.
The device authorization plugin supports pre-binding device codes to a specific user.
Adds an optional adapter method for atomic counter updates with conditional row guards; adapters without native support use a transaction-based fallback.
An experimental plugin enables popup-based OAuth sign-in in cross-site iframes by returning the session token through the bearer plugin.
Adds an atomic
incrementmethod to Redis secondary storage.This option controls SCIM token creation.
Remote introspection rejects tokens with a missing or mismatching aud claim; set allowMissingAudience to true when the introspection response legitimately omits aud.
Exposes common authenticator names for displaying friendly passkey provider names.
Resolves authenticator names from AAGUID so passkeys can display a friendly provider name.
Server-side accountInfo calls accept an optional userId, allowing trusted callers to read provider profiles without constructing session headers.
Adds a
genericOAuthconfig option for providers that omitexpires_inin their token response.Adds
toCamelCase,toSnakeCase,toPascalCase, andtoKebabCaseutilities.Social providers now support an array of client IDs as the ID token audience.
A bounded-concurrency async utility is available from @better-auth/core/utils/async.
Added a callback for injecting custom fields into token endpoint responses.
Added support for Stripe SDK v21 and v22.
Add the verified column to the twoFactor table; it defaults to true, so existing rows do not need a backfill.
The HaveIBeenPwned plugin adds an enable option.
The Drizzle adapter adds case-insensitive query support.
Experimental instrumentation covers endpoints, hooks, middleware, and database operations.
Team endpoints now accept an explicit organizationId parameter.
The OAuth provider adds pairwise subject identifiers as described in OIDC Core Section 8.
All built-in plugins expose a plugin version field.
The passkey package adds pre-auth registration and WebAuthn extensions support.
The OAuth provider adds prompt=none support.
Stripe plans can now customize prorationBehavior per plan.
The SSO plugin adds provisionUserOnEveryLogin.
The OAuth provider adds a public client prelogin endpoint.
The email-otp plugin adds resendStrategy to reuse an existing OTP.
The sendMagicLink callback now receives request metadata.
A config option enables custom routing for the 2FA page.
WeChat is available as a social provider.
Adds an agent auth plugin.
Exports adapter test suites from this package path for adapter authors.
Adds experimental OpenTelemetry instrumentation.
Adds twoFactorPage to the configuration.
Allows a password to be optional when creating a user.
Rate limiting can use IPv6 prefixes with a configurable subnet size.
Adds an endpoint to delete an anonymous user.
Adds pagination to the list endpoint.
Supports an organization reference via metadata.
Adds a static method for throwing errors with error codes.
Adds a configId field to the ApiKey table, defaulting to "default".
Exposes whether an API key references a user or an organization.
The client can update custom additional session fields without re-authentication.
Exposes the Better Auth version at runtime through AuthContext.
baseURL can be configured to resolve dynamically from incoming requests, with allowed hosts, a fallback URL, and automatic protocol detection.
Adds a dedicated subpath export for getMigrations.
A new plugin and client support desktop authentication in Electron, including system-browser OAuth, custom-protocol code exchange, and secure cookie management.
A plugin adds type-safe error translations and automatic locale detection from headers, cookies, or sessions.
The Kysely adapter is available as a separately installable package for smaller bundles and independent adapter versioning.
A minimal package entry point can be used with separately installed database adapters to reduce bundle size.
A plugin turns Better Auth into an OAuth 2.1 authorization server with OIDC compatibility, token management, dynamic client registration, and per-endpoint rate limits.
Adds typed plugin discovery through getPlugin() and hasPlugin().
The Stripe plugin adds billingInterval tracking.
A framework-agnostic remote MCP auth client can verify tokens and protect resources when the MCP server is separate from the Better Auth instance.
Supports plugin fields in enumeration-protected responses.
Adds deferred session refresh support for read-replica database setups.
Error codes can be defined as typed identifiers; error responses now include a machine-readable code field supported by APIError.
The SSO SAML configuration can enable support for SP-initiated and IdP-initiated SAML Single Logout.
The Stripe plugin adds support for usage-based billing via lineItems.
Enables flexible subscription checkouts, including per-seat and usage-based billing.
A built-in Hono adapter integrates the remote MCP auth client with Hono servers.
The organization plugin now accepts a function for membershipLimit.
Adds full support for Entra provisioning.
The generate command accepts an adapter flag to tailor schema output to a database adapter without requiring a full Better Auth config file.
Adds a button mode for Google sign-in in the one-tap plugin.
Allows an organization to be a Stripe customer.
Allows PKCE to be disabled for admin-created clients.
Plugins can define their own rate limit rules.
PluginContext is now parameterized with Options.
Adds silent authentication support for OIDC.
Adds Railway as a social provider.
Adds configurable per-endpoint rate limits.
Adds the authorization response issuer identifier.
Adds configurable size limits for SAML responses and metadata.
The Stripe plugin adds support for subscription schedules using scheduleAtPeriodEnd.
Adds operations to list, get, and delete SCIM provider connections.
Allows SCIM provider connections to be linked to users.
Stripe plans can set a per-seat price for organization subscriptions, with member changes automatically syncing seat quantity.
Enables flexible subscription checkouts, including per-seat and usage-based billing.
An ordered array of versioned secrets supports non-destructive key rotation; new data uses the first key and decryption tries all configured keys.
Lets applications programmatically skip session refresh for specific requests.
The phone-number plugin can pass additional data during sign-up on verification.
The SSO API adds endpoints to list, get, update, and delete providers.
Organization admins can generate enterprise SAML onboarding links, monitor SSO connection status, and manage provider configurations through the Infrastructure dashboard.
Adds more control over subscription cancellation and termination.
Adds tracking for upcoming subscription changes.
Adds a two-factor cookie max-age option; server-side trusted-device expiration is also supported.
A new endpoint allows custom additional session fields to be updated without re-authentication.
Verification tokens can be stored in secondary storage instead of the database by setting storeInDatabase to false.
Adds a server-side endpoint to verify the current user's password.
OAuth endpoints support configurable rate limiting.
Adds disableImplicitLinking to accountLinking.
Adds button mode for Google sign-in.
Adds endpoints for listing and retrieving SSO provider details.
Adds a separate option for configuring the two-factor cookie max age.
Adds the skipTrailingSlashes option to advanced config.
The Stripe upgradeSubscription API now supports a locale option.
Organization functionality now allows rejecting expired invites and filtering pending invitations.
SCIM adds compatibility with Microsoft Entra ID.
The MCP integration adds a setup_auth tool.
Integrations now support both React and Solid flavors of TanStack Start.
OAuth supports a custom authorizationEndpoint option.
Adds refetch to useSession for all clients.
Adds the verifyPassword API.
Adds Gumroad login support to generic OAuth.
Enhances the Stripe plugin with organization customer support.
Adds handling for the customer.subscription.created webhook event.
Adds a disableRedirect option for subscription and billing.
Adds jwksPath support to the OAuth provider.
Adds webBrowserOptions for configuring openAuthSessionAsync.
Adds flexible subscription cancellation and termination management.
Adds supportsArrays support to the memory and MongoDB adapters.
Adds a global configuration option to defer actions such as sending email and updates until after the response is sent.
Verified domains are used to trust providers automatically.
Adds an OAuth 2.1-compliant plugin.
Adds Patreon as a social provider.
Adds an
additionalFieldsoption to the verification table schema.Adds OIDC discovery support to SSO.
One-time-token verification can now set a session cookie.
Adds a helper for determining whether a domain is trusted.
The Drizzle PostgreSQL adapter now supports JSON.
The Kick OAuth provider now supports refresh tokens.
Adds a client plugin for tracking the last login method in Expo.
Adds a Better Auth command-line feature.
Supports trusted proxy headers when inferring the base URL.
Adds Vercel as an OAuth provider.
A custom JWKS endpoint can be configured.
The GitHub provider supports PKCE.
The api-key feature supports secondary storage.
Supports additional fields on accounts.
Supports storing account data in a cookie.
The Expo integration supports the account linking flow on mobile.
Adds join support to adapters and uses database joins across better-auth.
Supports phone number verification for account linking.
Allows customization of the random email generator.
Adds the AuthClient type helper.
Supports a custom callback for the authorization URL.
beforeCreateOrganization can pass an id through.
Adds the better-auth/minimal entry point.
Adds CaptchaFox support.
Allows passing a nonce for the OpenAPI plugin's CSP.
The accountLink callback receives ctx.
Supports custom response status codes.
Allows database transactions to be disabled.
Adds a verification URI to device authorization.
Adds the disableSignal client option.
Allows specifying permissions for the Discord provider.
Adds enum support for Drizzle schemas.
Provides preconfigured provider helpers for generic OAuth.
Supports custom token exchange for non-standard providers.
Adds returnHeaders to getSession so callers can receive response headers.
Exposes additional HTTP methods.
Infer.Session can infer the return type of a custom session.
Supports createdAt on organization invitations.
Supports a custom adapter option for JWT.
Adds key rotation for JWT.
Adds a JWT verification endpoint.
Client exports for Lynx are available.
Allows a raw function to be passed as middleware.
Adds an RP-Initiated Logout endpoint to the OIDC provider.
OpenAPI routes now include operationIds.
The organization plugin passes ctx to DB hooks.
Allows an organization slug to be used when listing members.
Allows configuring multiple passkey origins.
Adds the Paybin OAuth provider.
Adds the Polar OAuth provider.
Adds request state support.
Adds support for SCIM provisioning.
Automatically detects the client IP address server-side.
Adds chunking for session storage.
Supports siwe as a last login method.
Adds domain verification for SSO providers.
Adds an option to provide a login hint for SSO.
The SSOProvider type is exported.
Adds stateless session management.
Adds the storeStateStrategy option.
Adds the StripePlugin type.
Supports a custom callback for the token URL.
Trust device tokens can be refreshed.
Adds support for UUIDs.
Allows a custom verifyOTP implementation for phone-number authentication.
The OIDC provider allows the issuer to be configured.
Performance 14
The default in-memory replay store no longer slows down as request volume grows.
Expired verification rows are deleted at most once a minute per server instance instead of on every lookup.
Reduced installation size while preserving OpenTelemetry instrumentation attributes.
Server bundles are smaller because unused Zod locales are excluded.
Improved Auth0 domain normalization to avoid slow trailing-slash processing.
Improves performance for dynamic organization role permission checks.
getTestInstance uses a faster default password hasher to improve performance.
Compound table indexes were added to plugin database schemas.
Deletes sessions in parallel instead of sequentially, improving performance.
Improves performance in instrumented Next.js applications by reusing the
next/headersimport promise.Added database indexes to OAuth provider foreign-key fields in generated schemas.
Secondary-storage API key lookups now run in parallel, improving performance.
Adds an index on the organizations slug field.
Telemetry creation is lazy-loaded.
Behavior and default changes 55
Phone number verification codes use their own namespace.
The Stripe plugin adds support for Stripe SDK v23.
Email OTP sign-ins are now tracked in the last login method plugin.
Native OAuth clients using
localhostloopback redirects can use ephemeral callback ports.ID tokens issued alongside an access token now include the at_hash claim per OIDC Core §3.1.3.6.
The username plugin's separate displayUsername field can now be omitted.
OIDC user resolution for SSO sign-ins is transactional.
Confidential dynamic client registration clients can complete authorization-code flows without PKCE.
A refresh token reuse interval replays the same response for duplicate refresh requests.
resolveUsernow applies to SAML sign-ins as well as OIDC sign-ins.signOut() can now also sign users out of the OpenID provider.
signOut()can also sign users out of the OpenID provider.Remains synchronous; use
setItemAsync()when the write must be awaited.Token introspection is consistent across opaque and JWT tokens and scoped to the audience.
The server logs Cloudflare Turnstile error codes and binding mismatches to help diagnose CAPTCHA verification failures.
The endpoint supports POST, allowing the access token to be passed in the Authorization header.
The oidc-provider and mcp plugins now default plain PKCE off.
The sign-in redirect response now includes enabled 2FA methods.
The Mongo adapter stores new UUIDs as native BSON UUIDs; existing string UUIDs continue to work without a data migration.
The Mongo adapter stores UUIDs as native BSON UUID values.
Supports name, image, and additional fields during OTP sign-in.
Email sign-in and sign-up accept form data in addition to JSON bodies.
Adds IPv6 address normalization and subnet support for rate limiting and IP-based rules.
Adds backward-compatibility support for OAuth clients that do not use PKCE.
The init callback receives the same mutable context reference used throughout the auth lifecycle and can return arbitrary keys for other plugins to access.
Rate limiting separates request and response phases so rejected requests are no longer counted against the limit.
Allows users to reduce the requested scopes during consent.
Provider configuration can now be asynchronous.
Allows trusted providers to be resolved dynamically.
The client falls back to this environment variable to detect the base URL when no explicit baseURL is configured.
The signUpOnVerification flow supports user additionalFields.
The default logger level is now warn.
SSO supports providers serving multiple domains.
Sets the default IPv6 subnet to 64.
The password field is optional when creating a user with the admin plugin.
Applies focus refetch for rate limiting regardless of session state.
Encrypted tokens handled by the OAuth proxy now have an expiry timestamp.
SAML assertion timestamps are validated with per-provider clock skew.
Invited users can now see the organization name.
Multi-session can now infer additional fields.
Providers are trusted automatically when the domain verified flag is set.
Defaults to the database when one is provided.
SCIM parsing now supports the custom scim+json media type.
The API key client can be called on the server side.
API keys are cascaded when a user is deleted.
The client refetches the session when browser state changes.
Changing an email no longer requires an active session for email verification.
Expo detection supports multiple cookie prefixes.
Subscriptions can be updated when a subscription already exists.
Allows generateOTP to return undefined.
Supports asynchronous imports in getAdapter.
The MongoDB adapter supports string IDs instead of requiring ObjectIDs.
The OAuth state cookie uses SameSite="none".
Client and server permission checks are decoupled.
The session cache is refreshed before it expires.
Tooling 8
Auth helpers now support additional session fields.
The testing utilities now support Vitest 5.
Adds diagnostics for required fields in existing Prisma schemas that Better Auth never writes.
A standalone CLI replaces the previous @better-auth/cli package and provides init, migrate, generate, and upgrade commands.
An interactive command scaffolds a Better Auth configuration file, database adapter, and framework integration.
The CLI checks /auth for auth.ts.
Adds a CLI for automatic index handling.
The CLI supports virtual module imports in Cloudflare Workers.
Fixes and other changes 708
The OAuth provider and
requireMcpAuthcall this custom JWT plugin method on every verification instead of caching its keys; expensive reads may require caching in the key store.The request is passed again when the OAuth provider reads signing keys and when
requireMcpAuthverifies a token.Authorization URLs preserve empty query segments, including trailing or doubled
&characters.On Node, fetches no longer fail when the first DNS answer is unreachable, such as for hosts without outbound IPv6.
Client ID metadata fetches now work when the host is a public IPv6 literal.
Expired verification values are deleted when found, preventing them from being returned to repeated lookups.
These addresses are no longer misread as IPv4-mapped and are rejected as reserved.
Outbound checks no longer reject NAT64 addresses embedding a public IPv4 address, unblocking SSO discovery and CIMD fetches on DNS64 networks.
These endpoints no longer return a 500 error when a custom refresh token
decryptrejects an unrecognized value.Revoking another client's already revoked refresh token no longer deletes the presenting client's own tokens.
Requesting the
profilescope for a user with no name no longer returns a 500 error.OAuth provider
401 invalid_clientresponses include aBasicchallenge for the specified introspection, revocation, and invalid-signature cases.Endpoint errors now preserve header names set earlier by a hook or endpoint, keeping them accessible to cross-origin browser clients.
Query parameters already present on a provider's authorization endpoint are no longer re-encoded, avoiding changes such as
%20becoming+.DPoP requests no longer fail with a 500 error when deployments keep verification values only in secondary storage.
RP-initiated logout verifies this hint with in-process signing keys on runtimes that block requests to their own hostname.
Valid JWT access tokens are no longer reported as inactive when two auth instances share one
jwt()plugin object.Token verification reads signing keys from the auth instance on runtimes that block requests to their own hostname.
OAuth provider 401 challenges expose this header to cross-origin browser clients on every endpoint, including client registration and token endpoint authentication.
OAuth provider discovery no longer advertises endpoint URLs with a double slash when baseURL ends in a slash.
@better-auth/expo uses the better-call copy installed by better-auth instead of adding a second copy to Expo apps.
Plugin hook and endpoint errors no longer turn into generic 500 responses when an app installs more than one copy of better-call.
Official packages accept any better-call 1.4 patch release from 1.4.5 as a peer, helping plugins share one copy.
requireActiveAccessToken checks only the token; it does not enforce DPoP binding, so endpoints accepting DPoP-bound tokens need separate enforcement.
The OAuth provider warns when two extensions contribute the same discovery metadata key.
Sign-in callbacks are no longer missed on Windows and Linux when Chromium reorders or appends launch arguments.
The memory adapter no longer reuses stored row IDs after a delete when generateId is "serial".
Test files no longer share one MongoDB database, preventing parallel tests from deleting each other's data.
The PostgreSQL adapter now saves json fields whose value is an array.
Accepts tokens when the JWT plugin publishes its keys at jwks.remoteUrl and avoids a 500 on runtimes that block requests to their own hostname.
Protected resource requests using an unsupported authorization scheme or no scheme receive a Bearer challenge with resource_metadata.
Client session refresh listeners no longer accumulate on the server during SSR.
Cleaning up a client session subscription no longer throws when a test environment has torn down its globals.
Module-scope auth instances can handle requests when telemetry is enabled without a static baseURL.
Stripe webhooks for customers with no local subscription now log a clear warning instead of failing with a TypeError.
Refresh requests using deferSessionRefresh no longer fail with a 415 error in Next.js and Nuxt.
A rejected beforeDeleteOrganization hook no longer clears the session's active organization.
Failed requests using DPoP now receive a DPoP challenge instead of a Bearer challenge.
An expired session is no longer left in the request context after getSession returns null.
Session lookup no longer fails when a user.additionalFields entry references a table outside the Better Auth schema.
Tokens failing aud, iss, exp, or nbf claim checks now return 401 instead of 500.
Schema validation occurs on first use, preventing a validation error from being logged on every Cloudflare Workers cold start.
Every 401 response now includes a WWW-Authenticate challenge, including DPoP failures and requests with no token.
Rejected requests no longer become 500 errors, and invalid_token error details are included when a presented token fails verification.
Session polling now fires even when the runtime's navigator does not report connectivity.
An OAuth sign-up rejected by a user.create.before hook returning false no longer logs a TypeError.
Verification value consumption no longer hangs on Cloudflare Workers when an earlier request for the same identifier ends mid-query.
With serial ID generation, null filters on id and reference fields are no longer coerced to 0.
Runtime detection is exported from @better-auth/core/env.
Plugin packages no longer import from the better-auth root, preventing bundlers from emitting unused Kysely chunks when using better-auth/minimal.
Telemetry reports Cloudflare Workers as workerd instead of node when nodejs_compat is enabled.
Looking up the same valid device approval code twice at once no longer makes it appear invalid.
Discovery headers are sent to same-origin JWKS and kept on the discovery origin.
Failed deep link authentication is logged instead of causing an unhandled promise rejection in the main process.
The OAuth provider now returns the refresh token correctly when formatRefreshToken.encrypt is async.
Sign-ins using a genericOAuth provider with discoveryUrl no longer hang on Cloudflare Workers.
The MongoDB adapter adds indexes for schema fields marked unique or index, preventing duplicate users from concurrent sign-ups; fix index-build causes and restart if a build fails.
Rejected post-logout redirect URIs are reported as invalid_redirect_uri.
Startup schema checks and auth migrate no longer intermittently fail with missing-schema or missing-relation errors when other schemas are dropped concurrently.
contains, starts_with, ends_with, and case-insensitive filters match literal text instead of regex patterns with provider mongodb.
Derived IDs now have an ObjectId shape for Prisma ObjectId columns.
OAuth provider requests using resources no longer hang on Cloudflare Workers.
Session refresh extends the refreshed session's own SAML logout record.
SAML Single Logout continues working after session refresh.
Authentication requests no longer hang on Cloudflare Workers if the request that started schema validation ends before validation finishes.
SCIM now handles Groups with more than 100 members.
Sign-up emails are sent after the transaction commits.
Passkey accepts exact trusted origins under a wildcard allowed host.
Use updateMany instead of update when every row matching a non-unique filter should change.
Prisma adapter queries with eq null on MongoDB now also match records where the optional field was never set.
OAuth provider now supports HTTP deployments on private networks.
Prisma adapter incrementOne calls using mode: "insensitive" filters now match case-insensitively on PostgreSQL and MongoDB.
Memory adapter ne null where clauses no longer match records where the field was never set.
Defaults now accept issued access tokens when baseURL is only an origin by including the auth path in the default issuer, JWKS, and introspection URLs.
Prisma adapter update calls using mode: "insensitive" filters now match case-insensitively on PostgreSQL and MongoDB.
The list in secondary storage now receives an expiry when every remaining session has less than a second left.
Failed credential-account creation or password rejection no longer leaves behind a user that blocks retrying with the same email.
Calling
auth.api.oauth2Consent({ headers, body })from a server route no longer fails withrequest not found.CLI notices no longer contaminate command output: JSON remains valid,
auth secretprints only the secret line on stdout, and interactive-only tips stay in terminals.CLI errors show their cause rather than a stack trace; config and database errors are readable, and failed
auth mcporauth aisteps no longer report success.Client actions now honor the HTTP method in second-argument fetch options and do not attach a body for lowercase
getorHEAD.When
validateClientrejectsclient_id, the endpoint now returnsinvalid_clientinstead ofinvalid_grant, matching/device/codeand RFC 6749 section 5.2.The proxy no longer logs a provider configuration error on every OAuth sign-in for social providers set up for ID token sign-in only.
When a provider refuses token refresh with a 200 status, the expired access token is no longer returned.
Filtering that matches no members or an offset past the last member no longer causes a syntax error on PostgreSQL and MSSQL.
OAuth client metadata is now written as an object in its JSON column, enabling native Postgres
jsonboperators; rows stored as strings by earlier versions remain readable.OAuth state stored in the database no longer causes
state_mismatchduring the daylight saving time fall-back hour on servers observing daylight saving time.Query parameters are now documented for endpoints whose query schema is wrapped in
z.optional(), including/get-sessionand Stripe's/subscription/list.A missing, expired, or non-pending invitation now returns the
INVITATION_NOT_FOUNDcode.Overrides to
modelNameand field names no longer leak into other instances of the same plugin in one process.A client secret missing the configured prefix now receives the standard
invalid_clientresponse: 401 with a Basic challenge forclient_secret_basic, or 400 forclient_secret_post.MCP accepts plain-HTTP
resourceURLs on.localhostsubdomains instead of rejecting them as non-HTTPS.Failed wallet-address or account creation no longer leaves a user behind that prevents the wallet from signing in again.
Social sign-up no longer hangs on single-connection databases when the username plugin is enabled and the provider profile maps a username.
Using testWith: "mysql" no longer hangs, and each instance gets a separate database so several instances can run in one test file; requires a MySQL server at 127.0.0.1:3306 with the root password set to root_password.
Closes its own Postgres connection pool and SQLite database when the test file finishes; with Vitest's default sequence.hooks: "stack", afterAll hooks still run first and can use the instance.
Accepts introspected tokens when verifyOptions.typ is set.
Passkey registration and sign-in now work when one passkey() plugin is shared between auth instances where only some set baseURL.
MySQL create with generateId: "serial" no longer leaves an inserted row behind when the table reports no auto-increment id.
The phone number plugin no longer stores an empty phoneNumber on sign-up or replaces a verified number when linking an account with an empty phone number.
Remembered sign-ins and sign-ups now refresh their session even if an earlier sign-in in the same browser used rememberMe: false.
TOTP verification now accepts API key sessions so they can finish two-factor enrollment.
Trusted devices are no longer ignored when an app runs the two-factor sign-in step from its own hook on another sign-in path, such as email OTP.
Webhooks no longer attribute a subscription to the wrong record when records share a Stripe customer ID.
Email lookup no longer matches a different address on accent-insensitive database collations.
The command leaves unparseable MCP config files, including files with comments or trailing commas, unchanged and prints the config to add manually.
For Remix and React Router v7, the command generates an app/routes/api.auth.$.ts resource route that mounts auth.handler instead of creating a second auth instance with an unsupported database option.
The command no longer hangs during database migration.
The command no longer re-launches the CLI through npx auth@latest in an endless loop.
API keys in secondary storage now verify, load, and list when the storage client returns already-parsed JSON, such as @upstash/redis.
The HubSpot helper preserves access tokens containing reserved characters and returns null when no token is present instead of requesting
/access-tokens/undefined.Headers and cookies set by a non-returning before hook are preserved in the response; the endpoint's value wins when both set the same header or cookie.
Responses with an out-of-range status or invalid reason phrase no longer crash the process; the client is reported as invalid_client.
The endpoint no longer rejects usernames accepted at sign-up when validationOrder.username is post-normalization.
Non-string callbackURL query values are rejected with a 400 instead of causing a 500.
Non-string checkoutSessionId query values are rejected with a 400 instead of causing a 500.
The Vue client's useSession(useFetch) now returns a session during Nuxt SSR when baseURL is inferred from the environment.
Kakao sign-in now forwards loginHint so the Kakao Account login page opens with the ID field prefilled.
Two-factor TOTP now accepts imported Base32 secrets stored as base32:<secret>.
When session lookup fails, the original database error is preserved as error.cause.
The function now typechecks under exactOptionalPropertyTypes when it returns undefined for name, email, or image.
Restored pre-1.7.11 handling so account info does not fail after the ID token stored at sign-in expires.
Fixed metadata refreshes overwriting concurrent administrator changes to discovered clients.
Plugin init returns with options: undefined now pass type checks under exactOptionalPropertyTypes.
Fixed repeated PostgreSQL migration diffs for int8 columns.
Fixed the OpenAPI schema to match the endpoint's redirect response.
Fixed Expo social account linking with ID tokens when a session cookie is present.
Fixed database-backed rate limiting returning an excessively large X-Retry-After value.
Google One Tap now honors the plugin-level
autoSelectsetting.Fixed subpath imports and type resolution for this plugin path.
Fixed imports from this path failing with a not-exported error.
Fixed subpath imports and type resolution for this path.
Google One Tap now honors the plugin-level
cancelOnTapOutsidesetting.Errors for unknown OAuth
client_idvalues now sayclient not found.Device-code clients can refresh access for approved resources omitted from a token poll.
Valid DPoP proofs are no longer rejected for parameterized routes or URLs with trailing slashes.
Requests containing both supported and unsupported grants are no longer rejected.
Google One Tap no longer calls a prompt method unsupported by FedCM or retries skipped prompts.
Google One Tap sign-ins now record
googleas the last login method.Google One Tap sign-ins now respect configured Google profile mapping and user info updates.
Native clients with HTTP loopback callbacks are no longer rejected when application type inference is enabled.
Unreachable JWKS endpoints are reported as server errors instead of invalid tokens.
findManynow respects ID sorting, avoiding potentially repeated or skipped paginated results.Unknown OAuth clients now receive
invalid_clientinstead ofinvalid_grant.PKCE verifier errors now return the specified HTTP 400 response and error code.
Attempts to change cached trusted clients now return HTTP 400 instead of HTTP 500.
Unverifiable JWT access tokens no longer cause server errors at userinfo, introspection, or revocation endpoints.
Handlers finish before responses are sent, and failures are logged without interrupting requests.
After hooks run for writes retained after a failed request on adapters without transactions.
Valid AsyncLocalStorage initialized after importing Better Auth but before first use is recognized, and invalid runtime-provided values receive corrected errors in edge and browser fallbacks.
Atlassian user info errors are no longer mislabeled as Figma errors in logs.
Requests no longer hang after interrupted async context initialization.
SAML providers with linked accounts can change their post-login callback URL.
Native OAuth clients can use custom-scheme redirect URIs that include a host.
Device sessions are no longer missing, and automatic session switching no longer fails after cache eviction.
Drizzle sign-in, session refresh, and date filtering work with string-based date columns.
Using
generateId: "uuid"no longer causes sign-in failures or replay-check and SIWE email handling issues.Providers remain available after discovery fails at startup by retrying discovery on subsequent requests.
Sign-in tolerates up to 30 seconds of clock difference with identity providers.
Concurrent D1 queries on a shared auth instance no longer cause cross-request I/O errors.
Foreign keys are generated correctly when custom table names match another model key.
Sign-in no longer fails when
cookieNameormaxAgeis explicitlyundefined.Callback URLs retain their percent-encoded characters during magic link verification.
Using
mcp()no longer causes type errors withexactOptionalPropertyTypes.Sign-in and account linking with ID tokens work when signing keys omit
alg.Authentication errors no longer mask the original transaction commit failure.
Failed transaction commits no longer leave transactions open and block other writes.
Concurrent writes retry transient errors instead of failing with transaction conflicts.
Startup resource-seeding failures no longer block authentication routes until restart.
Using
oauthProvider()no longer causes type errors withexactOptionalPropertyTypes.OIDC sign-in works when the mapped email claim contains a list of addresses.
Organization plugin types no longer cause errors when
skipLibCheck: false.SAML providers with linked accounts accept IdP signing certificate rotation.
SCIM requests no longer silently ignore attribute names with different letter case.
Concurrent SCIM updates return
409instead of500when a unique value is already claimed.Inactive users with an existing
externalIdcan be reprovisioned through SCIM.SCIM User and Group requests accept nullable attributes sent as JSON
null.Nullable attributes sent as JSON
nullare accepted in User and Group requests.Session failures no longer leave sign-ups, passkey registrations, or SSO sign-ins in an inconsistent state.
SSO provider registration and updates accept partial
mappingvalues that omit defaulted fields.Completed one-time Stripe checkouts are no longer reported as webhook failures.
SvelteKit 3 is included in the supported peer dependency range.
Phone number password resets use the configured
verifyOTPcallback.The active organization now refreshes after sign-in when a session hook selects the initial organization.
CAPTCHA errors now include the JSON Content-Type header.
Prevents consumeOne from deleting a record when a concurrent write invalidates its original condition.
Rate-limit errors now include the JSON Content-Type header.
Older responses no longer overwrite newer results when requests overlap.
Fixed automatic seat updates after an organization resubscribes, even when canceled subscriptions remain in its history.
Fixed schema validation for capitalized custom Prisma model names.
Fixed schema validation for Cloudflare D1 when the Kysely dialect cannot introspect the database.
Fixed model identity when a custom model name matches another schema key.
Fixed social account linking through the OAuth Proxy plugin.
Fixed hydration mismatches when session or plugin auth queries resolve before streamed components hydrate.
Fixed schema validation for SQLite-generated primary keys, including INTEGER PRIMARY KEY columns without AUTOINCREMENT.
Removed the unused optional peer dependency to prevent installation conflicts.
Improved server-side logging for Cloudflare Turnstile verification failures.
Fixed unnecessary pacing when metadata cannot be cached.
Fixed database option type inference outside Cloudflare Workers.
Fixed lazy database initialization when using Drizzle relations.
Fixed index validation for existing string columns.
Fixed migrations incorrectly identifying tables and views across schemas.
Improved schema validation for the adapter.
Fixed storage of multibyte session data.
Fixed bundling when the optional OpenTelemetry API is not installed.
Restores compatibility with 1.6 account schemas by identifying accounts with
(providerId, accountId)instead of issuer; users who applied the 1.7 issuer schema should follow the upgrade guide for cleanup.Reports installed dependency versions instead of declared specifiers.
Can now complete when generated setup groups have no dependencies.
Skips unsupported dependency specifiers and provides a clear warning.
Fixes discovery failures with
ERR_INVALID_IP_ADDRESSon supported Node.js versions.TikTok sign-in and token refresh now work with the documented
clientKeyandclientSecretoptions.Restores
consumeOneas an optional method for custom database adapters.Fixes
getSessionfailures when cookie caching is disabled and cached session cookies remain.Restores
incrementOneas an optional method for custom database adapters.Generic OAuth discovery failures no longer take down the authentication API.
Generated OpenAPI required fields now align with runtime validation.
Callback hooks are no longer skipped after proxied OAuth sign-ins, and server state is preserved when callback cookies are unavailable.
Prevents duplicate session requests and hydration mismatches in Nuxt, and adds a type-safe integration for the Vue client's
useSessionhook.Auth request logs now respect the configured logger, log level, and disabled setting.
Registration now works when clients share at least one supported grant with the server.
Programmatic migrations now work on Cloudflare D1 while retaining existing-index validation.
Async context is preserved in Cloudflare Workers bundles with multiple runtime conditions.
Missing Drizzle schema fields in compound where clauses are now validated.
Invalid signed session data in the cookie cache now produces warnings.
The current auth endpoint context can now be accessed synchronously and optionally.
Disabled MyISAM indexes no longer satisfy migration index checks.
Permanent user bans now clear expiration dates left by previous temporary bans.
Built-in placeholder emails now use the namespaced
{identifier}@{namespace}.placeholder.invalidformat.Relative redirect URLs containing fragments are now handled correctly.
Same-origin form submissions are accepted with
Referrer-Policy: no-referrer, while untrusted origins remain rejected.Relative callback URLs containing ~ are now allowed by trusted-origin checks.
One-to-one Drizzle relations now work when usePlural is enabled.
The CLI refuses to add required columns without default values to tables that already contain data.
Caching follows shared-cache freshness rules, including s-maxage precedence, conditional revalidation, immediate staleness for invalid or duplicate freshness directives, and convergence of concurrent refreshes.
Trusted server code can retain a terminal connection binding before a dynamic SCIM connection's first authenticated request when supplying a provisioning domain during decommissioning.
Test instances support native database transactions for PostgreSQL and MySQL.
SSO provider registration allows reusing a SCIM connection ID because SCIM connections no longer participate in the authentication provider namespace.
Restored
Account.accountIdalongside the requiredissuer, preserving issuer-scoped account identities.Voluntary and essential
acrclaim requests are handled according to OIDC Core.auth migrate can add required columns with static defaults and nullable unique columns to existing tables.
Form-encoded POST authorization requests are accepted, while unsupported OIDC request objects are rejected.
Raw database instances passed directly as database now support native adapter transactions, matching explicit { db } and { dialect } config shapes.
The drizzle-kit peer dependency range was widened.
Registration preserves client key metadata and the requested authentication method.
Auth config loading now supports the
export default { auth }module shape.Revocation reports
unsupported_token_typefor a JWT access token.Scope errors return 403 with an RFC 6750 insufficient_scope WWW-Authenticate challenge naming every missing scope, allowing clients to request all needed scopes in one authorization request.
Nonce-bound confidential clients can request
offline_accesswithout PKCE.Exported the generated binding so drizzle-kit can emit
CREATE SCHEMAfor custom PostgreSQL namespaces.Client assertions may use the OpenID Provider issuer as their audience.
The token endpoint requires
redirect_urionly when the authorization request included one.The logout flow supports form-encoded POST requests and confirmation pages.
String Boolean values for SCIM User active and the primary sub-attribute are parsed case-insensitively at HTTP ingress, improving Microsoft Entra interoperability.
Filtered SCIM PATCH values are created when no target matches instead of rejecting the request.
Token revocation and back-channel logout delivery wait until session deletion commits.
UserInfo accepts bearer tokens sent in a form-encoded request body.
The
profileandemailscope claims remain on the UserInfo response rather than ID tokens.Fixed an ACCOUNT_NOT_FOUND error when retrieving an access token after stateless OAuth sign-in links a new provider to an existing user.
Fixed SAML sign-in for providers using samlConfig.callbackUrl as their ACS URL without spMetadata.metadata.
Concurrent cold-start requests no longer intermittently lose authentication or transaction context due to an async storage initialization race.
Domain verification snapshots provider domains at request start and returns 409 with this error if they change during DNS resolution, allowing callers to reload and retry.
Restores client plugin declaration compatibility for downstream TypeScript consumers.
Auth endpoint types now align with better-call.
The CLI now aligns installed packages with the running CLI version.
Prevents duplicate session requests during React Suspense retries while preserving revalidation for interrupted refreshes.
Completes even when no background task handler is configured.
Allows retrying password reset after an invalid password is entered.
Passes the verification type to custom OTP generators during email OTP sign-up.
Skips invalid secondary-storage session entries without discarding other valid sessions.
Uses the transaction-scoped adapter to prevent SQLite deadlocks and ensure keys commit with their surrounding transaction on Postgres and MySQL.
No longer collapses
createAuthClienttype inference when combined with other client plugins.Uses
SCANinstead ofKEYSso large keyspaces no longer block the Redis server.Preserves Apple user data from
form_postcallbacks.No longer collapses
createAuthClienttype inference when combined with other client plugins.$fetch is now exposed on the Solid client.
Internal adapter queries are no longer routed to the wrong table when a built-in table's modelName matches another table's schema key.
Apple OAuth now sends the PKCE code challenge during authorization, preventing token exchange failures.
$store is now exposed on the Solid client.
An initialization race on serverless cold starts no longer causes intermittent "No request state found" errors.
The command no longer fails when the config imports the not-yet-generated output file, such as on a Convex first run.
Auth query revalidation and signal listeners are restored after a client component remounts.
The hook receives the endpoint context as its second argument.
SQLite migration diffs recognize BIGINT as a valid number type, preventing spurious pending changes on rate limiter columns.
The index signature type is more precise.
Remote MCP auth 401 challenge headers are exposed to browser clients.
Schema generation no longer produces duplicate indexes for fields marked both unique and index.
The endpoint forwards multiple Set-Cookie headers separately so the browser does not drop the transfer-token cookie during OAuth handoff.
Exact schema key matches take precedence over modelName aliases, preventing adapter queries from being misrouted when names collide.
IdP-initiated SAML sign-ins in split-origin deployments redirect to the configured application URL instead of the authentication server.
Plugin user fields such as username and displayUsername are included in the /sign-up/email and /update-user request bodies.
Invitations use database-generated IDs when advanced.database.generateId is configured, matching other models.
The method no longer fails with "User not found for member" for organizations with more than about 100 members.
Drizzle schema generation adds disambiguating relationName values for tables with multiple foreign keys to the same model.
Auth requests no longer fail when request cloning throws an error inside verification callbacks.
With throw set to true, the data type no longer incorrectly excludes null.
Fixed affected row counting for D1 and postgres-js adapters.
Fixed string default values not being properly escaped in the generated Drizzle schema.
SCIM write-path operations now correctly honor the active attribute.
adapter.update returns null when no matching row is found.
The CLI generates BETTER_AUTH_SECRET values with 32 characters instead of 16.
Calling deviceAuthorization() without a schema option no longer throws a ZodError under Zod v4.
disableMigration: true is respected on plugin schema tables during generation and runtime migration.
OAuth sign-up and account linking ignore provider profile values for fields marked input: false.
Declaring inherited APIError properties fixes TypeScript inference errors.
English language fallback behavior is fixed.
Account-linking logs now route through the configured logger.
Array additionalField default values are now serialized correctly in the Drizzle schema generator.
Auth client return types are emitted correctly in TypeScript declaration builds.
The generate command now handles a directory path passed to --output.
Password reset tokens now work with the Drizzle MySQL adapter after being consumed.
Fixed cookie cache fallback lookup.
Token rotation, revocation, two-factor backup-code regeneration, device-code claiming, and organization invitation acceptance no longer fail on Prisma or MongoDB servers older than 5.0.
Clearing cross-subdomain cookies now includes the domain.
Callback, session, and passkey route schemas are now valid for client generators.
SCIM user filter values are no longer logged when listing users.
Errors from sendVerificationEmail are now surfaced to the client.
Cache cookies near the browser's per-cookie size limit are split into chunks instead of being silently dropped.
Single-use verification flows reuse active transactions to avoid hanging on connection-limited database adapters.
Expected authentication validation failures now log as warnings instead of errors.
Fixes compatibility with SQL Server.
Prevents the cache from growing on every access token verification.
No longer discards concurrent writes when a transaction fails.
update and delete are no-ops on empty filters instead of modifying every row.
Accurately serializes Zod request schemas, including optional, nullable, intersected, and record-shaped types.
Bun and Node drivers correctly report affected row counts and inserted row IDs; the Bun driver also supports multi-parameter binding.
Preserves account cookies when switching users in the same browser session.
Creates a credential account for users with only social or magic-link accounts, allowing direct password assignment without manually editing the account table.
The CLI resolves SvelteKit, Vite asset, and Cloudflare Workers virtual-module imports when loading the auth config.
Times out after 10 seconds so slow or unreachable captcha providers do not hang requests indefinitely.
Avoids duplicate requests from focus and other browser events, reduces unnecessary re-renders through stable client hook data references, and prevents loading state from sticking after unmount during a request.
Generic OAuth sign-in works when userinfo lacks
suboridand the mapping function derives the account ID.Concurrent writes are not discarded when a transaction fails; empty-filter
updateanddeleteare no-ops, andupdateManyreturns the affected-row count.Model
idfields are now marked as required.Surfaces errors instead of silently reporting success when a failure is not a missing-record error.
Schema regeneration updates existing Prisma field types, including emitting
BigIntorIntwhen bigint configuration changes.The CLI skips
Unsupported()fields when regenerating the Prisma schema.Removes user membership through the organization adapter so team memberships and member-removal hooks are applied correctly.
Bun and Node Kysely drivers report affected row counts and inserted row IDs correctly; Bun parameter binding and SQL Server
consumeOneare also fixed.Account information and tokens are read correctly when different server instances handle sign-in and subsequent requests.
Preserves pending invitations by removing only the deleted team's reference rather than invalidating the invitations.
Caches signing keys per auth instance rather than fetching them from the database on every request.
Returns the number of rows affected, as the adapter contract specifies.
Accepts custom session fields inferred through
inferAdditionalFields.Works without an email by assigning a stable placeholder; mapProfileToUser can supply a real one.
SCIM provisioning returns 409 when a user with the same email already exists unless linkExistingUsers is set.
The setting is now forwarded to samlify's ServiceProvider when validating SAML responses, fixing ERR_SUBJECT_UNCONFIRMED errors.
Improved cookie regex character ranges for more accurate cookie parsing.
The hook now runs correctly when OAuth authorization resumes after sign-in, account selection, or consent.
Returns
USER_NOT_FOUNDinstead of a generic 500 when the target user does not exist.Generated database schemas now allow null values for optional fields.
Expo splits oversized account cookies across multiple storage keys, preventing sign-in loss when a provider issues large tokens.
A non-numeric value returned by an adapter's deleteMany now surfaces a clear error instead of silently failing.
Organization logo now accepts null on create and update, allowing users to clear an existing logo.
When only secondaryStorage is configured, storeStateStrategy now defaults to database instead of cookie, preventing oversized-cookie errors.
The option is now applied when linking accounts through the standard OAuth redirect flow.
verifyApiKey no longer rejects keys created under a non-default configId when the request omits configId.
The missing
AdminClientOptionsexport is now available.Accepts
client_secretvalues containing colons.Adds
better-callas a peer dependency to fix TypeScriptTS4023declaration emit errors.Where queries no longer drop OR clauses when mixed with AND conditions.
Improves URL normalization and Stripe search query escaping to handle edge cases correctly.
The SQLite introspector no longer incorrectly reports tables as views.
Verify-email links URL-encode
callbackURLfor OAuth account linking and username sign-in.Returns
NOT_FOUNDwhen the referenced client no longer exists.Tolerates missing spaces after
;separators, preventing some proxy users from being treated as logged out.Percent-encodes cookie values containing special characters such as
;,", or\.Rolls back on failure instead of leaving orphaned rows.
Email OTP sign-in no longer fails with captcha errors under default captcha settings.
OAuth state validation failures now redirect to the per-flow
errorCallbackURLinstead of the default error page.Hook rejections in SSO OIDC and SAML callbacks now redirect to
errorCallbackURLinstead of returning a JSON error.Migration field indexes are now ordered correctly.
Now respects the dynamic
baseURLprotocol option.Uses a robust cascading fallback strategy wrapped in a transaction.
Supports path-prefixed issuers.
Forwards
state_not_found,state_invalid, andstate_mismatchinstead of the genericplease_restart_the_processcode.Forwards specific error codes instead of collapsing all errors into
user_creation_failed.OAuth proxy flows no longer fail with
state_mismatchwhen production and preview environments use different secrets.OpenAPI schema generation emits unique
operationIds for endpoints that expose multiple HTTP methods.Invitations no longer route users to the wrong team when team IDs contain a comma.
The missing
OrganizationClientOptionsexport is now available.Properly decodes escape sequences in quoted strings.
Prevents a crash when
transportsis undefined.The request is cloned before being passed to the callback, avoiding request mutation.
Refresh headers are now forwarded when resolving sessions.
Accepts hashed nonces for native iOS sign-in.
URL-encodes error values in redirect query strings.
Cache refresh preserves the real session expiry instead of resetting it.
Synthetic users no longer include extra fields.
The option now accepts any valid IPv6 prefix length from 0 to 128 instead of a narrow set of values.
The response now includes an error code so clients can identify why the email change was rejected.
Added an internal adapter method for atomically consuming verification rows.
The anonymous plugin now calls this when email verification triggers auto sign-in.
Fixed a TS2742 type error when using additionalFields in the organization plugin by adding missing re-exports.
The command no longer generates broken MySQL and PostgreSQL Kysely database configs.
Added a compatibility alias for the SIWE nonce endpoint.
The bearer plugin no longer writes duplicate cookie entries when merging the session token into request headers.
This option now takes effect when re-inviting the same email instead of always returning USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION.
Fixed the captcha plugin breaking the email-otp flow.
Instrumentation imports now use a no-op entry when OpenTelemetry is not installed.
Corrected email casing in one-tap, email-otp, and email-verification flows.
Parameters no longer override internally managed Stripe Checkout Session fields such as success_url, cancel_url, customer, and line_items.
Improved link accessibility.
Redirects no longer cause a TypeError when OAuth error descriptions contain non-ASCII characters.
Exported helper types needed for portable downstream TypeScript declaration emit.
The callback now receives the post-update subscription row instead of a stale snapshot.
The callback now receives the post-update subscription row instead of a stale pre-update snapshot.
The callback now receives the raw stripeSubscription object.
Organization invitations now accept dynamic access control roles.
When passkey autofill authentication cannot start, it now returns a handled cancellation instead of an unhandled error.
Corrected the OpenAPI schema's required fields for this endpoint.
Exposed refreshUserSessions on the internal adapter.
Made sessionId optional in refresh token types to match the schema.
Redirect responses from social sign-in and magic-link endpoints no longer emit duplicate Set-Cookie headers.
callbackURL is no longer ignored and now redirects correctly like signIn.email.
The endpoint no longer throws NOT_FOUND for providers configured via defaultSSO.
The hook no longer retains a previous user's role after sign-out in SPA flows.
useSession now revalidates after admin impersonation starts or stops.
The adapter factory now resolves instrumentation to the pure variant in edge and browser environments.
Fixed incompatibility with TypeScript's exactOptionalPropertyTypes compiler option.
Fixed support for passing id through the beforeCreateTeam and beforeCreateInvitation hooks.
Fixed the fallback for OAuth providers that may omit email from their profile response.
Response headers are no longer lost when an APIError is thrown.
callbackOnVerification is now called when updatePhoneNumber is enabled.
A no-op instrumentation module is served in browser and edge runtimes to prevent runtime errors.
Parsing OAuth2 state no longer crashes when the request body is undefined.
Passkey authentication verification now returns the user.
When using auth.api, the userinfo endpoint now reads the Authorization header from request context.
Boolean coercion of the disableRefresh query parameter is fixed in custom session validation.
An ESM/CJS compatibility issue when loading samlify is fixed.
@opentelemetry/api is now an optional peer dependency.
Passing phoneNumber: null to updateUser now removes the phone number.
Session loading reads cached data from SecureStore on app startup, avoiding a login screen flash for returning users.
Forwarded Set-Cookie headers now preserve the Partitioned attribute.
Inference of team additional fields in the organization plugin is corrected.
Fixed sessions not refreshing after /change-password and /revoke-other-sessions.
Fixed UUIDs set through forceAllowId in database hooks being ignored by PostgreSQL adapters when advanced.database.generateId is set to uuid.
Fixed dynamic baseURL resolution from request headers for direct auth.api calls.
Unauthenticated dynamic client registration now silently overrides confidential auth methods to public, improving compatibility with MCP clients.
Fixed the nullable schema for the get-session endpoint in the OpenAPI 3.1 spec.
Fixed a race condition that caused excessive requests per second in the client.
Corrected the operationId for the requestPasswordResetCallback endpoint in the OpenAPI spec.
Checkout and upgrade flows now omit quantity for metered prices.
Fixed multiple SAML response processing bugs, including ACS URL generation, encryption field handling, and provider config parsing.
Backup code updates now respect the configured storage strategy after verification.
Fixed CLI path alias resolution for extended configs and mid-path wildcards.
Fixed account collisions across providers in the link-social callback.
Multi-valued query parameters no longer collapse through prompt redirects.
Replaced the cookie probe with header-based RSC detection to fix infinite router refresh loops.
Signed SAML AuthnRequests now include RelayState.
Fixed SAMLResponse decoding failures caused by line-wrapped base64.
Unverified TOTP enrollment no longer blocks sign-in.
All checkPassword failures return INVALID_PASSWORD.
Endpoint instrumentation always uses the route template.
getSession is accessible in the generic Auth<O> context.
Account cookie comparison now uses the provider accountId rather than an internal id.
The endpoint now uses accountId instead of an internal id.
Stateless cookieCache maxAge now matches session.expiresIn.
Deprecated createAdapter and type exports were restored for backwards compatibility.
customIdTokenClaims can now override standard claims, including acr and auth_time.
The OAuth provider enforces database-backed sessions when secondary storage is enabled.
The Prisma adapter uses deleteMany when deleting by a non-unique field.
FedCM is enabled to suppress Google GSI deprecation warnings.
OAuth proxy callback parameters are now read from the body for form_post.
generic-oauth now uses the discovery userinfo endpoint instead of hardcoded URLs.
The verification endpoint now returns additional fields.
Password hashing now uses non-blocking scrypt to avoid blocking the event loop.
Passwordless users can now manage 2FA.
The PostgreSQL migration now uses CREATE INDEX.
Session ID generation is fixed for secondary storage used without a database.
Client session refresh now handles throw: true correctly and preserves stale session data on network or server errors.
The twoFactorTable option is now wired to the schema modelName.
The Prisma adapter uses updateMany as a fallback for non-unique updates.
Filters null organizations from listUserInvitations results.
Fixes declaration type errors in the distributed OAuth provider package.
Improves allowed paths for oauth_query in the client plugin.
Improves Stripe organization customer search by checking customerType.
Returns a Response for HTTP request contexts.
Handles Electron safeStorage encryption failures gracefully.
Uses a namespace import for samlify to fix ESM compatibility.
Fixes handling of skipOriginCheck when configured as an array.
Replaces the {CHECKOUT_SESSION_ID} placeholder in the Stripe success callbackURL.
Handles throw:true during session refresh.
The CLI now resolves path aliases from extended tsconfig files.
SSO domain verification now handles bare domains.
Passes the user field through the idToken sign-in body to support Apple names.
Avoids fetch redirect CORS after login in the oauth-provider.
Invite and member-removal checks now handle users with multiple roles.
The client preserves stale session data when network or server errors occur.
Focus refresh now preserves custom session fields.
Adapter packages are moved to dependencies to fix missing module errors.
The expo integration handles origin overrides across mutable and immutable requests.
Fixes the access control indexing type.
Prevents cookies from being double encoded.
CustomIdTokenClaims now override standard claims.
Allows localhost subdomains in the isLocalhost function.
Uses a lookahead heuristic to split Set-Cookie headers.
SSO prefers the UserInfo endpoint over the ID token and maps the sub claim correctly.
Direct imports fix bundler re-export type resolution for the client.
safeJSONParse revives date strings in pre-parsed objects.
Verification operations are supported when using secondary storage.
Improves locking strategies across adapters to prevent transaction deadlocks.
Synchronizes updateSession changes and removes duplicate writes.
Fixes endpoints returning empty arrays when more than 100 inactive sessions exist.
Email matching for social account linking is case-insensitive.
Supports the new versioning scheme introduced in Expo SDK 55.
Error details are passed through to the API-key response.
The callbackURL in delete-user verification emails is encoded.
Provisioning types allow custom organization roles.
Already verified users without a session are skipped when sending email verification.
The CLI includes .env.local when loading dotenv files.
Corrects construction of error redirect URLs.
Passkey expirationTime is computed per request instead of at initialization.
Cookie retrieval is more permissive.
Headers detection uses an instanceof check with a cross-realm fallback.
Adds error handling for ID token verification in Apple and Google providers.
Encrypted secret verification failures return invalid_client.
The listUsers filter is applied when filterValue is defined.
Statements can be passed directly into newRole.
Date values from the database are safely coerced in the OAuth provider plugin.
Default values for the required attribute are inferred correctly.
Fixes the relay state redirect on the SAML ACS route.
Adapter operations improve support for select, allowing developers to use select with adapters more reliably.
Custom sessions use getSetCookie() to preserve individual Set-Cookie headers.
Corrects IdentityProvider configuration in signInSSO.
The TXT record is resolved at the verification subdomain instead of the root domain.
The /subscription/cancel/callback endpoint uses the correct stripeCustomerId.
The list type changes from never[] to UserWithRole[].
The Microsoft Entra ID provider supports verifyIdToken.
Deep link cookie injection supports wildcard trusted origins.
Refreshes the account_data cookie when a session is refreshed.
Finds the active subscription correctly when upgrading.
Exports types for the anonymous plugin.
Allows changing the billing interval while keeping the same plan.
Properly handles the metadata field in client registration.
Centralizes cookie parsing and correctly handles Expires dates.
Makes the Facebook provider API version consistent.
Handles serial and false cases in generateId.
Surfaces OAuth token exchange errors.
Updates the Google OAuth endpoints.
Adds routing for IdP-initiated SAML callbacks.
Logs an error when the configuration is invalid.
Prevents duplicate cookies when the same user signs in multiple times.
Correctly handles OAuth callbacks and the Apple email field.
Fixes the userinfo route mismatch.
Filters fields marked returned: false from organization API responses.
Respects the explicitly set sendOnSignUp option.
Skips invalid sessions when listing sessions.
Users can re-subscribe to the same plan after their subscription has expired.
Cookie handling falls back to isProduction when baseURL is not set.
Output schemas now exclude only fields marked
returned: false.Improves OTP comparison for hashed and encrypted values.
The activeTeamId field is present when dynamic access control is enabled.
Rate limiting supports IPv6 address normalization and subnet handling.
The account cookie is set on re-login when updateAccountOnSignIn is false.
Plugin actions are deep-merged on the client so all methods are preserved.
TanStack imports now use the server subpath.
Email sign-up now allows an empty name.
Updates the Figma provider's default scope and OAuth endpoints.
Fixes the TanStack Start cookie plugins for React and Solid.js.
Fixes cookie-based OAuth state when using expo-authorization-proxy.
Organization endpoints are inferred when dynamic access control and teams are enabled.
Expiration fields now return dates.
Cookie attributes are preserved when cookies expire.
getSchema now has a generic return type for proper field inference.
Prevents duplicate tokens from appearing in the active sessions list.
Defines the method for the delete-anonymous-user path.
The dual module warning is removed.
Calls the afterEmailVerification hook when email verification succeeds.
Removes a double stringify/parse of the metadata field.
Hooks are now called during the change-email-verification flow.
Prevents Convex cleanup from deleting fresh sessions.
Restores ctx.query from the cookie in the OAuth flow.
Filters null values from dynamic trusted origins.
Sending email verification for another user now fails with EMAIL_ALREADY_VERIFIED.
Redirected responses now set the Location header.
Expired rate-limit entries are cleaned up in memory storage.
Prompt retry logic now respects user dismiss actions.
Lifts eq AND conditions to the root so updates detect a unique where field.
Prevents duplicate subscription creation when a subscription already exists.
Passes metadata to the subscription object in the upgrade method.
Improves Stripe error handling and the subscriptionSuccess route.
Adds missing POST endpoints to the client pathMethods.
Removes the strict length pre-check during API key verification.
Correctly infers types for ZodDefault fields.
Fixes anonymous hooks breaking when a path is missing.
Fixes type inference for custom roles.
First login falls back to checking fetch Metadata.
Only session database storage is currently supported.
Fixes cookie handling in non-HTTPS environments and points provider requests to production.
Chains plugin onRequest hooks properly.
Adds subscription/restore to pathMethods.
Synchronizes updateSession changes to secondary storage and the active-sessions list.
Updated data is now merged correctly in the account cookie.
The trusted origins environment variable is now respected.
The adapter now applies
customTransformInputto where-clause values.Helper types are now included in package exports.
Internal organization creation is allowed when organization creation is disabled for the client.
IP headers are now respected in development and test environments.
The list-members where clause now uses an operator.
The state query parameter is omitted when no state is provided.
Adds compatibility with OpenAPI 3.1.
Cookie parsing now preserves
=padding.Stripe subscription IDs now use the Stripe ID.
Corrects wildcard pattern matching for
trustedOrigins.Discovery URLs are normalized and validated.
Prevents stateless refresh when a database is configured.
Prevents active sessions from being deleted prematurely in secondary storage.
Adds logger creation in the adapter factory.
Fixes array field handling across adapters and schema generation.
Pathnames are normalized when
basePathis set to the root.Handles query parameters in the magic-link error callback URL.
Improves OIDC compatibility with exact optional property types.
Marks the /get-session response as nullable in OpenAPI.
Provider options can now return null from
getUserInfo.Allows running the internal adapter outside context.
Fixes affected row counts returned by updateMany and deleteMany.
Organization plugin types are now exported.
Fixes the CLI secret command generating an empty value.
Ensures a non-chunked session data cookie is cleared.
Awaits the username validator.
Account data cookies are chunked when they exceed the limit.
Additional field default values are applied when creating a session.
The MCP authorization server URL is now the origin URL.
Resolves the getSignedCookie return type in the OIDC provider.
Fixes log level priority.
Fixes multi-session endpoints when signatures are invalid.
Customizing fields is optional when configuring rate limit options.
Returns null early when userid is not defined.
Corrects an incorrect null type in OpenAPI.
Removes incorrect blocking logic in OTP setup and verification.
Fixes support for @tanstack/solid-start in the tanstackStartCookies plugin.
The operation uses adapter.deleteMany instead of delete.
Sign-in handles capitalized email addresses correctly.
The client no longer triggers get-session twice on focus.
The CLI migration no longer fails when addIndex and addColumn are chained on the same alterTable builder.
A session is no longer required.
Schema generation no longer creates duplicate indexes.
The APIs return the user's additional field.
The plugin supports @tanstack/solid-start.
Default values for custom fn fields are now evaluated properly.
JWT retrieves the latest keys from storage properly.
The error message for a bad TOTP code during 2FA setup is improved.
Adapter handling of optional numeric ID references is corrected so nullable foreign keys do not become the string "null".
Update queries use updated field values in their WHERE clause.
Where clauses now receive the missing data type transformation.
User updates can handle additional fields and validation.
Fixes string[] inference for additionalFields.
Additional fields are persisted in the cookie cache.
addPasskey returns passkey data instead of undefined.
Backup codes are no longer encrypted twice.
The /change-email endpoint triggers the session signal.
MCP respects the consent requirement.
Cookie size limits no longer cause an error.
Duplicate customer creation during signup is prevented.
A customer's email is synchronized when the database changes.
The Drizzle deleteMany result is a number.
Fixes GenericOAuth and SSO authorization handling so discoveryUrl is not ignored.
Migration order is corrected when dynamicAccessControl is enabled.
Adds missing email validation.
The user object reflects the emailVerified update made by magic-link authentication.
The MongoDB ends_with query behavior is made consistent.
Username types are compatible with exactOptionalPropertyTypes.
MongoDB findOneAndUpdate returns its value.
Treats generateId serial as a numeric ID and corrects UUID column types across adapters.
The getCustomerCreateParams hook is now called when creating a customer.
The getSession return type now includes null.
The last used method is detected for passkey logins.
Magic-link sign-in no longer returns an early error when signup is disabled.
The generic OAuth integration awaits asynchronous mapProfileToUser results.
The MCP DCR response includes the Content-Type header.
Preserves provided string IDs in the MongoDB adapter when they are not valid ObjectIds.
OAuth proxy flows support cross-origin requests and return multiple Set-Cookie headers instead of a comma-separated header.
The OIDC login prompt value is cleared after login.
OIDC prompt parameters receive proper handling.
The configured onDelete behavior is no longer ignored.
The callback now returns the updated subscription.
Membership checks work for organizations with large member counts.
Generic OAuth and OAuth2 user information updates now work with overrideUserInfo.
Uses identity instead of serial for PostgreSQL schemas.
PostgreSQL support respects search_path when using a non-public schema.
Fixes subscription cancellation failing with Prisma.
When refetchInterval triggers, it now makes an active network request.
The API key refill interval time calculation is corrected.
removeTeamMember works with Prisma.
Refreshes sessions in secondary storage when a user is updated.
Corrects a reference used by server-only actions.
The custom-session implementation no longer overwrites the Set-Cookie header.
Creating an SSO provider with a providerId already in use is prevented.
Stripe error codes are returned from the plugin.
Reference validation checks for reference IDs.
When telemetry is disabled, async imports are avoided, fixing esbuild compatibility.
Updating an API key no longer updates lastRequest or incorrectly tracks usage.
Username behavior respects the send-on-sign configuration.
The React useSession type now includes isRefetching.
An empty email is checked for after user profile mapping.
The Drizzle adapter handles all operators in multiple where conditions.
withPath handles empty and root paths and prevents double slashes.
Fixes a type annotation issue.
The OpenAPI schema for the email verification endpoint is fixed.
The OIDC provider uses a consistent iat claim.
OTP validation uses the twoFactorEnabled flag instead of a database lookup.
Fixed the origin check in Expo when the origin is null.
Corrected typesVersions paths so TypeScript can resolve package types correctly.
Falsy values are now accepted as valid defaults.
The GitLab provider's token endpoint was fixed.
Passkey atom listeners now work.
Passkey no longer breaks when throw is true.
In Expo, set-header now retriggers $sessionSignal.