better-auth
Bug Fixes
- Fixed field index ordering in
getMigrationmigrations. (#9691) - Fixed synthetic user construction to exclude extra fields. (#9347)
- Fixed session cookie refresh headers not being forwarded when resolving sessions. (#9667)
- Fixed
changeEmailto return an error whenemailVerification.sendVerificationEmailis missing, and URL-encodedcallbackURLin verify-email links. (#9614) - Fixed
callbackURLURL-encoding in verify-email links for OAuth account linking and username sign-in. (#9792) - Fixed
role.authorizeto reject empty action lists and correctly evaluateORconditions on unknown resources. (#9603) - Fixed missing exports of
AdminClientOptionsandOrganizationClientOptions. (#9642) - Fixed email OTP sign-in failing with captcha errors under default captcha settings. (#9596)
- Fixed
parseJSONto properly decode escape sequences in quoted strings. (#9617) - Fixed cookie parsing to tolerate missing spaces after
;separators, preventing users behind certain proxies from being treated as logged-out. (#9543) - Fixed
getTrustedOriginsto respect the dynamicbaseURLprotocol option. (#9644) - Fixed request mutation by cloning the request before passing it to the
sendVerificationEmailcallback. (#9619) - Added
accessTokenExpiresInconfig option togenericOAuthfor providers that omitexpires_inin their token response. (#9799) - Fixed oauth-proxy to forward specific error codes instead of collapsing all errors into
user_creation_failed. (#9723) - Fixed oauth-proxy flows failing with
state_mismatchwhen production and preview environments use different secrets. (#9385) - Fixed OAuth callback errors to forward specific error codes (
state_not_found,state_invalid,state_mismatch) instead of the genericplease_restart_the_processcode. (#9788) - Fixed OAuth state validation failures to redirect to the per-flow
errorCallbackURLinstead of the default error page. (#9789) - Fixed OpenAPI schema generation to emit unique
operationIds for endpoints that expose multiple HTTP methods. (#9721) - Fixed organization invitations silently routing users to the wrong team when team IDs contained a comma. (#9616)
- Fixed
deleteOrganizationandremoveMemberto roll back on failure instead of leaving orphaned rows. (#9630) - Fixed stateless session cache refresh to preserve the real session expiry instead of resetting it. (#8817)
- Fixed a session cookie leak that allowed
session_tokenandsession_datacookies to be captured and replayed to bypass 2FA when cookie caching is enabled. (#9639) - Fixed missing username validation on the admin
createUserendpoint. (#9464)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Bug Fixes
- Fixed expired magic-link tokens and OAuth authorization codes to be reliably rejected, and corrected their error codes. (#9624)
- Fixed the
registration_endpointto be hidden from.well-knownmetadata unless dynamic client registration is enabled. (#9448) - Fixed Basic Auth credential parsing to accept
client_secretvalues containing colons. (#9601) - Fixed the consent update endpoint to return
NOT_FOUNDwhen the referenced client no longer exists. (#9600) - Fixed OAuth and OIDC metadata discovery for path-prefixed issuers. (#9668)
For detailed changes, see CHANGELOG
@better-auth/core
Features
- Added
toCamelCase,toSnakeCase,toPascalCase, andtoKebabCaseutilities to@better-auth/core/utils/string. (#9727)
Bug Fixes
- Fixed Sign in with Apple to accept hashed nonces for native iOS sign-in. (#8870)
- Fixed
verifyAccessTokento return proper unauthorized errors for invalid token verification failures. (#9655)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed hook rejections in SSO OIDC and SAML callbacks to redirect to
errorCallbackURLinstead of returning a JSON error. (#9702) - Updated XML parser dependency to a patched release to resolve security alerts. (#9662)
- Fixed SSO OIDC callback to URL-encode error values in redirect query strings. (#9722)
For detailed changes, see CHANGELOG
@better-auth/drizzle-adapter
Bug Fixes
- Fixed the Drizzle adapter dropping OR clauses when mixed with AND conditions in where queries. (#9756)
- Fixed MySQL insert-return handling with a robust cascading fallback strategy wrapped in a transaction. (#9665)
For detailed changes, see CHANGELOG
@better-auth/passkey
Bug Fixes
- Fixed a crash when passkey
transportsis undefined. (#9746) - Fixed passkey challenges to be consumed atomically, preventing replay attacks, and improved error status codes for failed registrations and authentications. (#9622)
For detailed changes, see CHANGELOG
@better-auth/api-key
Bug Fixes
- Fixed TypeScript
TS4023declaration emit errors by addingbetter-callas a peer dependency. (#9759)
For detailed changes, see CHANGELOG
@better-auth/electron
Bug Fixes
- Fixed cookie serialization to percent-encode values containing special characters like
;,", or\. (#9631)
For detailed changes, see CHANGELOG
@better-auth/kysely-adapter
Bug Fixes
- Fixed SQLite introspectors (
BunSqliteDialect,NodeSqliteDialect) incorrectly reporting tables as views. (#9615)
For detailed changes, see CHANGELOG
@better-auth/stripe
Bug Fixes
- Improved URL normalization and Stripe search query escaping to handle edge cases correctly. (#9661)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@bytaesu, @chdanielmueller, @cyphercodes, @gustavovalverde, @jsj, @kgarg2468, @Paola3stefania, @ping-maxwell, @reslear
Full changelog: v1.6.11...v1.6.12