Sourced from better-auth's releases.
v1.6.25
better-authBug Fixes
- Fixed Apple OAuth not sending the PKCE code challenge during authorization, causing token exchange failures (#10294)
- Fixed Google One Tap creating new users when sign-up was disabled on the Google provider (#10479)
- Fixed
$fetchand$storenot being exposed on the Solid client (#10444)- Fixed internal adapter queries being routed to the wrong table when a built-in table's
modelNamewas set to another table's schema key (e.g.user.modelName = "account").For detailed changes, see
CHANGELOGContributors
Thanks to everyone who contributed to this release:
@birkskyum,@jsj,@krish-vachhaniFull changelog:
v1.6.24...v1.6.25v1.6.24
better-authFeatures
- 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 keyFor detailed changes, see
CHANGELOG
auth
... (truncated)
Sourced from better-auth's changelog.
1.6.25
Patch Changes
#10479
5124c34Thanks@krish-vachhani! - Prevent Google One Tap from creating new users when sign-up is disabled for the Google provider.#10444
7439359Thanks@birkskyum! - Expose the real$fetchinstance and$storeatoms from the Solid client instead of resolving them as dynamic API routes.Updated dependencies [
0ffd1fb]:1.6.24
Patch Changes
#10235
03dc5a0Thanks@ping-maxwell! - Fixes silent foreign-key and adapter-join misrouting when a user remaps a built-in model name to a string that collides with another schema key#10357
7508940Thanks@c-nicol! - Fixes Kysely migration generation for new-table fields that are both unique: true and index: true.#10342
bae7198Thanks@ping-maxwell! - Fixorganization.listMembersfailing with "User not found for member" for orgs with more than ~100 members by applying the same membership limit to the users query.#10336
ef4d273Thanks@Tushar-Khandelwal-2004! - Prevent verification callbacks from failing auth requests when cloning the request throws.#10333
99dbdd7Thanks@c-nicol! - Fixes Drizzle schema generation for fields that are both unique: true and index: true.#10368
086ca91Thanks@gaurav0107! - Force-validate the requestOriginon the magic-link (/sign-in/magic-link) and email-otp (/email-otp/send-verification-otp) send endpoints, including cookieless requests, to match the built-in/sign-in/emailand/sign-up/emailroutes. A cookieless cross-origin POST can no longer trigger a magic-link or verification-OTP email to an arbitrary address. Cookieless requests that carry noOrigin(server-to-server) are unaffected.#10290
8f2deddThanks@GautamBytes! - Expose the remote MCP auth client's 401 challenge headers to browser clients using CORS.#10453
4e685eeThanks@ping-maxwell! - OpenAPI now includesuser.additionalFieldsand plugin user schema fields (e.g. username pluginusername/displayUsername) on/sign-up/emailand/update-userrequest bodies.#10190
3bf0e49Thanks@gaurav-init! - Pass the endpoint context as the second argument tobeforeDeleteOrganizationandafterDeleteOrganizationhooks in the organization plugin, matching the signature shown in the docs and the existingdatabaseHookspattern. The Stripe plugin'sbeforeDeleteOrganizationwrapper now forwards the context to user-supplied hooks instead of dropping it.#10040
f59a0eeThanks@shiminshen! - Organization invitations now let the database generate theiridwhen ID generation is delegated to the database (e.g.advanced.database.generateId: "uuid"with a UUID-capable adapter such as Postgres), matching every other model. PreviouslycreateInvitationalways generated the invitationidin application code, so invitation rows received an app-generated value instead of a database-generated one while organizations, members and teams correctly deferred to the database (better-auth/better-auth#10024). A caller-provided id (e.g. viabeforeCreateInvitation) is still honored.#10302
0f2cc1bThanks@momomuchu! - Prefer exact schema-key matches overmodelNamealiases ingetDefaultModelName, so remapping a built-in table onto another table's schema key (e.g.user.modelName = "account") does not reroute internal adapter queries to the wrong table.#9787
ae78109Thanks@ping-maxwell! - Fixes an issue whereuseSession({ throw: true })incorrectly excludednullfrom itsdatatype.#10222
46d2bf0Thanks@ping-maxwell! - fix: add no-store cache-control headers to get-session route#10316
29a373eThanks@vinay-oppuri! - Recognize SQLiteBIGINTas a valid number type in migration diffs so database-backed rate limiter columns likelastRequestno longer report spurious pending changes on every run.#10379
f6d18faThanks@ping-maxwell! - fix(client): restore auth query revalidation and signal listeners after remount
... (truncated)
07a646e
chore: release v1.6.25 (#10491)7439359
fix(solid): expose $fetch and $store on the solid client (#10444)dac701c
chore(deps): bump next from 16.2.6 to 16.2.11 (#10493)5124c34
fix(one-tap): enforce google provider signup restrictions (#10479)9a661c7
chore: release v1.6.24 (#10323)4e685ee
fix(open-api): include plugin user fields on sign-up/update bodies (#10453)d3ce782
fix(cookies): tighten CookieAttributes index signature type (#10441)
(#10442)ae78109
fix(client): preserve null in useSession().data type with throw:true (#9787)f6d18fa
fix(client): restore auth query lifecycle after remount (#10379)086ca91
fix(magic-link, email-otp): force-validate Origin on cookieless send
endpoint...