npm / better-auth
better-auth
What changed in better-auth 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
19 security2 new APIs and options1 performance27 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbetter-auth 149 changes
Security 19
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.
Better Auth: Account takeover via pre-account hijacking on magic-link and email-OTP sign-in
Better Auth has stored XSS in the auth-server origin via javascript: redirect_uri in oidc-provider and mcp
Better Auth: Device authorization approve and deny accept any authenticated session while the user code is pending
Better Auth has an account takeover issue via OAuth auto-link to unverified pre-registered email
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
Better Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp plugins
Better Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flows
Better Auth vulnerable to unauthorized invitation acceptance via unverified email match in organization plugin
Better Auth: OAuth callback accepts mismatched
statewhen cookie-backed state storage is used without PKCEBetter Auth: OAuth refresh-token rotation forks the token family on concurrent redemption
Better Auth: Rate limiter keys IPv6 addresses individually and is bypassable via prefix rotation
Better Auth Has Two-Factor Authentication Bypass via Premature Session Caching (session.cookieCache)
Better Auth affected by external request basePath modification DoS
Better Auth's multi-session sign-out hook allows forged cookies to revoke arbitrary sessions
New APIs and options 2
Added optional self-service signing key rotation for
private_key_jwtclients.Added
isContinuationso users can complete authorization after selecting an organization.
Performance 1
Reduced installation size while preserving OpenTelemetry instrumentation attributes.
Fixes and other changes 27
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 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.