Sourced from better-auth's releases.
v1.6.20
better-authBug Fixes
- Fixed account-linking logs to route through the configured logger (#10121)
- Fixed TypeScript inference errors by declaring inherited
APIErrorproperties (#8734)- Fixed refresh cookie
Max-Ageto be capped atexpiresIn(#9621)For detailed changes, see
CHANGELOG
@better-auth/i18nBug Fixes
- Fixed English language fallback behavior and improved i18n documentation (#9872)
For detailed changes, see
CHANGELOGContributors
Thanks to everyone who contributed to this release:
@adityachaudhary99,@dipan-ck,@sleepe229,@WilsonnnTanFull changelog:
v1.6.19...v1.6.20v1.6.19
better-authFeatures
- Added support for pre-binding device codes to a specific user in the device authorization plugin (#9995)
Bug Fixes
- Fixed headerless session checks (#10053)
- Fixed cookie cache fallback lookup (#9348)
- Fixed
sendVerificationEmailerrors not being surfaced to the client (#8863)- Fixed auth client return types not being emitted correctly in TypeScript declaration builds (#10071)
- Fixed session and account cache cookies being silently dropped when near the browser's per-cookie size limit by splitting them into chunks (#10088)
- Fixed single-use verification flows (such as magic-link) hanging on connection-limited database adapters by reusing active transactions (#10070)
- Fixed the domain not being included when clearing cross-subdomain cookies in the
last-login-methodplugin (#9319)- Fixed the
oauth-popupplugin leaking internal OAuth state keys intoadditionalData(#10067)- Reverted the headerless session check fix (#10074)
For detailed changes, see
CHANGELOG
auth
... (truncated)
Sourced from better-auth's changelog.
1.6.20
Patch Changes
#10121
21448b1Thanks@adityachaudhary99! - OAuth account-linking and create-user error logs now respect a customloggerconfigured inbetterAuth(), instead of always being written to the default console logger.#9621
8ecf238Thanks@dipan-ck! - Session refresh no longer emits a cookie Max-Age above the browser's 400-day ceiling when using a database without fractional-second precision.#8734
930f534Thanks@sleepe229! - declare inherited APIError properties to fix TypeScript inference errorsUpdated dependencies []:
1.6.19
Patch Changes
#10088
de4aa52Thanks@bytaesu! - Session and account cache cookies near the browser's per-cookie size limit (for example with a longcookiePrefixor many cached fields) are now split into chunks instead of being silently dropped by the browser. A cache too large to fit even when chunked is skipped with a warning rather than failing the request, so reads fall back to the database.#9995
b4b0266Thanks@ElGauchooooo! - The device authorization plugin now accepts an optionaluser_idwhen issuing a device code via/device/code, pre-binding the code to that user. Only the bound user can approve or deny the code, so a publicly visible user code can no longer be claimed by someone else.#10086
5bd5e1cThanks@gustavovalverde! - Refresh-token rotation and token revocation, two-factor backup-code regeneration, device-code claiming, and organization invitation acceptance now work on Prisma. Concurrent or repeat requests in these flows could previously return an error on Prisma instead of the expected result.On MongoDB servers older than 5.0, these flows and other guarded value updates (rate-limit window resets, API-key refills) no longer fail with an empty-update error.
@better-auth/core:incrementOnenow reports a clear error when called with noincrementand noset.#9319
581f827Thanks@ping-maxwell! - fix(last-login-method): include domain when clearing cross-subdomain cookies#10067
8407885Thanks@bytaesu! - Theoauth-popupplugin now ignores internal OAuth state fields passed through itsadditionalDataparameter, soadditionalDataonly ever carries your own custom values.#9555
c1a8a64Thanks@ChrisMGeo! - Fix invalid OpenAPI output for Better Auth callback, session, and passkey routes so client generators can consume the schema.#10071
635f190Thanks@gustavovalverde! - Auth clients exported from wrapper packages can now be emitted in TypeScript declaration builds without extra type annotations.#10070
a787e0bThanks@gustavovalverde! - Single-use verification flows no longer hang on database adapters that use a one-connection pool. This fixes magic-link verification and similar token checks in connection-limited serverless database setups.#9348
c2f718fThanks@ping-maxwell! - fix: cookie cache fallback lookup#8863
7d18175Thanks@ping-maxwell! -sendVerificationEmailwas invoked viarunInBackgroundOrAwait, which could defer work whenadvanced.backgroundTasks.handleris configured (so the handler could return 200 before the email callback finished) and, in the default path, caught and logged errors without rethrowing. User callbacks that throwAPIError(e.g. 429 from a rate limiter) were therefore not reliably reflected in the HTTP response (better-auth/better-auth#8757).Now we await
sendVerificationEmailFnso failures surface to the client with the correct status. The unauthenticated/send-verification-emailpath enforces a constant-time floor (500 ms) so that the response duration does not reveal whether the email belongs to a real unverified user.
... (truncated)
c342f42
chore: release v1.6.20 (#10108)21448b1
fix: route account-linking logs through the configured logger (#10121)8ecf238
fix(session): cap refresh cookie Max-Age at expiresIn (#9621)ac4d81d
chore: release v1.6.19 (#10034)1e69725
docs: clarify stateless Cognito token refresh (#10092)de4aa52
fix(cookies): chunk session and account cookies near the browser size
limit (...5bd5e1c
fix: make guarded state transitions portable on Prisma (#10086)36f345b
revert: fix: allow headerless get session checks (#10053)
(#10074)635f190
fix(client): name auth client return types (#10071)d009dae
fix: allow headerless get session checks (#10053)This version was pushed to npm by GitHub Actions, a new releaser for better-auth since your current version.