v1.6.24 Release
This release adds request context support to ID token verification, GDPR compliance options for login tracking, and fixes numerous bugs including session caching, type definitions, database migrations, and security issues across multiple packages.
better-auth
Features
- Added request context (
ctx) as a third argument toverifyIdToken, enabling custom ID token verifiers to read request headers (#10376) - Added
beforeStoreCookieoption to the last-login-method plugin for GDPR compliance (#5753)
Bug Fixes
- Replaced flaky MongoDB where-coercion integration test with a direct unit test for more reliable test runs (#10369)
- Fixed the
get-sessionendpoint to includeno-storecache control headers, preventing stale session data from being served (#10222) - Fixed SQLite migration diffs to recognize
BIGINTas a valid number type, preventing spurious pending changes on rate limiter columns (#10316) - Fixed auth requests failing when request cloning throws an error inside verification callbacks (#10336)
- Fixed
useSession({ throw: true })incorrectly excludingnullfrom itsdatatype (#9787) - Fixed auth query revalidation and signal listeners not being restored after a client component remounts (#10379)
- Fixed the
CookieAttributesindex signature type to be more precise (#10442) - Fixed silent misrouting of adapter queries when
user.modelNamewas set to a value that collides with another schema key (#10235) - Fixed Kysely migration generation producing duplicate indexes for fields marked both
uniqueandindex(#10357) - Fixed magic-link and email-OTP send endpoints to validate the
Originheader on cookieless requests, preventing cross-origin abuse (#10368) - Fixed remote MCP auth 401 challenge headers being hidden from browser clients due to missing CORS exposure (#10290)
- Fixed OpenAPI schema to include plugin user fields (such as
usernameanddisplayUsername) in/sign-up/emailand/update-userrequest bodies (#10453) - Fixed
organization.listMembersfailing with "User not found for member" for organizations with more than ~100 members (#10342) - Fixed organization invitations to use database-generated IDs when
advanced.database.generateIdis configured, matching the behavior of other models (#10040) - Fixed
getDefaultModelNameto prefer exact schema key matches overmodelNamealiases, preventing adapter queries from being misrouted when a built-in table's name collides with another schema key
For detailed changes, see CHANGELOG
auth
Bug Fixes
- Fixed SvelteKit builds by stubbing explicit-environment-variables modules (#10221)
- Fixed Drizzle schema generation producing duplicate indexes for fields marked both
uniqueandindex(#10333) - Fixed Drizzle schema generation for tables with multiple foreign keys to the same model by adding disambiguating
relationNamevalues (#10352) - Fixed
auth generatefailing when the config file imports the not-yet-generated output file (e.g. on a Convex first run) (#10302)
For detailed changes, see CHANGELOG
@better-auth/electron
Bug Fixes
- Updated compatibility testing to include Electron 43 (peer range unchanged at
>=36.0.0) (#10440) - Fixed
/electron/init-oauth-proxyforwarding multipleSet-Cookieheaders as a single comma-joined string, which caused the browser to drop the transfer-token cookie during OAuth handoff (#9672)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed an intermittent "No request state found" error caused by a race condition in
AsyncLocalStorageinitialization on serverless cold starts (e.g. Cloudflare Workers) (#9862)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed IdP-initiated SAML sign-ins in split-origin deployments to redirect users to the configured application URL instead of the authentication server, using
idpInitiatedCallbackUrl(#10388)
For detailed changes, see CHANGELOG
@better-auth/stripe
Bug Fixes
- Fixed
beforeDeleteOrganizationandafterDeleteOrganizationhooks not receiving the endpoint context as the second argument (#10190)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@akshatmalik-bruh, @ayushman46, @c-nicol, @gaurav-init, @gaurav0107, @GautamBytes, @momomuchu, @OrangeManLi, @paoloricciuti, @ping-maxwell, @shiminshen, @swithek, @Tushar-Khandelwal-2004, @vinay-oppuri
Full changelog: v1.6.23...v1.6.24
Source: original entry ↗