Packages

better-auth

1.7.25 · 14 Nov 2026MIT20.8M / weekRepositoryHomepagenpmAtom feed

Upgrading better-auth From 1.1.0 to 1.7.28

164 releases in betweennotes for 154

Other targets from 1.1.0Clears its 18 advisories1.6.13Latest1.7.25
  1. 1.1.0yours
  2. 5 releases
  3. 1.1.6security
  4. 38 releases
  5. 1.3.10security
  6. 35 releases
  7. 1.4.11security
  8. 11 releases
  9. 1.5.0security
  10. 8 releases
  11. 1.6.2security
  12. 8 releases
  13. 1.6.11security
  14. 31 releases
  15. 1.7.7security
  16. 7 releases
  17. 1.7.15security
  18. 12 releases
  19. 1.7.28target
38+
changes to make
18
advisories fixed
596+
new
1427+
fixes

Counted from 154 of 164 release notes. Advisories are counted from the advisory database, in full.

Start here

Before you upgrade

Tick each one off as you go
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0
  • Breaking1.7.0

Security

Fixes 18 advisories affecting 1.1.0

  • Fixed organization and API key metadata, and OAuth proxy sign-ins with a constructor field in additionalData, failing with a prototype pollution error

    1.7.15
  • Fixed a critical Magic Link account-takeover vulnerability.

    1.7.7
  • Fixed an invitation takeover vulnerability by enabling requireEmailVerificationOnInvitation by default and extending the verification gate to getInvitation and listUserInvitations

    1.6.11
  • Fixed OAuth state verification against cookie-stored nonce to prevent CSRF

    1.6.2
  • customSyntheticUser option: Support plugin fields in enumeration-protected responses (#8097).

    1.5.0
  • Prevent OTP reuse via race condition: Atomically invalidate OTPs on use.

    1.5.0
  • Prevent user enumeration: In email-otp when sign-up is disabled, and on sign-up with required email verification.

    1.5.0
  • Stricter default rate limits: For password reset and phone number verification endpoints.

    1.5.0
  • Separate CSRF and origin checks: More granular request validation.

    1.5.0
  • Prevent trial abuse: Check all user subscriptions before granting a free trial.

    1.5.0

Release by release

  1. 1.7.28

    24 Nov 202612 fixes
    • Fixed

      Fixed /device/code returning a 500 on a user or device code collision with the Drizzle adapter by retrying with a new code

    • Fixed

      Fixed concurrent email OTP requests for the same address so both emails carry the same valid code on databases with a unique verification.identifier

    • Fixed

      Fixed sending a new email OTP to replace the earlier code for that address so stale codes no longer cause refusals

    • Fixed

      Fixed sending a new phone number OTP to replace the earlier code so a code sent during a check stays valid

  2. 1.7.27

    20 Nov 20266 fixes
    • Fixed

      Fixed the phone number plugin returning a 500 instead of a 400 from /update-user when the request has no body

    • Fixed

      Fixed the username plugin returning a 500 on /sign-up/email and /update-user when the request has no body; it now returns the same 400 as without the plugin

    • Fixed

      Fixed /sign-in/anonymous to validate the request origin, returning a 403 for browser requests from origins outside trustedOrigins

    • Fixed

      Fixed unpinned tokens such as ID tokens and session JWTs to prefer a key for the primary jwks.keyPairConfig.alg algorithm

    • Fixed

      Fixed getTestInstance from better-auth/test to run every instance cleanup even when one fails, so databases and connections are not left open

    • Fixed

      Fixed POST requests without a body, such as /sign-out or /revoke-sessions, failing with a 415 on Deno, Next.js, Nuxt and other servers that pass an empty body stream

  3. 1.7.26

    18 Nov 20261 new · 2 fixes
    • New

      Added a getAccountFields option to social providers for storing custom values on the provider account at sign-in

    • Fixed

      Fixed expired verification values being returned to repeated lookups by deleting them when found

    • Fixed

      Fixed two-factor sign-in to reject an expired challenge before sending an OTP or counting a failed attempt

  4. 1.7.25

    14 Nov 20261 fix
    • Fixed

      Fixed endpoint errors dropping Access-Control-Expose-Headers names set earlier by a hook or the endpoint, so cross-origin browser clients keep access to exposed headers

  5. 1.7.24

    14 Nov 20261 fix
    • Fixed

      Improved verification lookups to delete expired rows at most once a minute per server instance instead of on every lookup

  6. 1.7.23

    13 Nov 20261 fix
    • Fixed

      Fixed getTestInstance sharing one MongoDB database across test files, so parallel tests no longer delete each other's data

  7. 1.7.22

    12 Nov 202610 fixes
    • Fixed

      Fixed verification value consumption hanging on Cloudflare Workers when an earlier request for the same identifier ended mid-query

    • Fixed

      Fixed module-scope auth instances on Cloudflare Workers logging a schema validation error on every cold start by validating on first use

    • Fixed

      Fixed deferSessionRefresh refresh requests failing with a 415 error in Next.js and Nuxt

    • Fixed

      Fixed ReferenceError: window is not defined when a client session subscription is cleaned up after a test environment tears down its globals

  8. 1.7.21

    11 Nov 20269 fixes
    • Fixed

      Fixed plugin packages importing from the better-auth root, so bundlers no longer emit unused Kysely chunks when used with better-auth/minimal

    • Fixed

      core: Use ObjectId-shaped derived ids for Prisma ObjectId columns

    • Fixed

      Fixed the device approval page showing a valid code as invalid when the same signed-in user looked it up twice at once, such as under React Strict Mode

    • Fixed

      Fixed sign-ins with a genericOAuth provider using discoveryUrl and OAuth provider requests using resources hanging on Cloudflare Workers

25 internal lines (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.