better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
In short
1 breaking1 deprecated9 new40 fixed
- Breaking
Aligned
freshAgecalculation with session creation time instead of update time - Deprecated
Deprecated
oidc-providerplugin in favor of@better-auth/oauth-provider
Security
Fixes 1 advisory that affected 1.5.6
- HighBetter Auth: OAuth refresh-token rotation forks the token family on concurrent redemptionGHSA-392p-2q2v-4372 · 7 Jul 2026Fixed in 1.6.0
13 advisories affect 1.6.0; 1.7.7 fixes them
- Criticalbetter-auth: OAuth state can be used as a Magic Link to sign in as another userGHSA-965c-763c-88jm · 27 Oct 2026Fixed in 1.7.7
- CriticalBetter Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp pluginsGHSA-pw9m-5jxm-xr6h · 7 Jul 2026Fixed in 1.6.11
- Highbetter-auth: OAuth Proxy lets an attacker sign in as another userGHSA-r4xp-prcw-77qf · 27 Oct 2026Fixed in 1.7.7
- Highbetter-auth: Device login approval does not show the requesting client or permissionsGHSA-q84f-53jg-9ppm · 27 Oct 2026Fixed in 1.7.0
- HighBetter Auth: Account takeover via pre-account hijacking on magic-link and email-OTP sign-inGHSA-qq9h-g4jm-xgf3 · 24 Jul 2026Fixed in 1.6.22
8 more
- High@better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitiveGHSA-7w99-5wm4-3g79 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth has insecure cryptographic defaults in oidcProvider: alg=none advertised and plain PKCE accepted by defaultGHSA-9h47-pqcx-hjr4 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth has stored XSS in the auth-server origin via javascript: redirect_uri in oidc-provider and mcpGHSA-86j7-9j95-vpqj · 7 Jul 2026Fixed in 1.6.13
- HighBetter Auth has an account takeover issue via OAuth auto-link to unverified pre-registered emailGHSA-g38m-r43w-p2q7 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth vulnerable to unauthorized invitation acceptance via unverified email match in organization pluginGHSA-fmh4-wcc4-5jm3 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth: Device authorization approve and deny accept any authenticated session while the user code is pendingGHSA-cq3f-vc6p-68fh · 4 Jun 2026Fixed in 1.6.11
- ModerateBetter Auth: OAuth callback accepts mismatched `state` when cookie-backed state storage is used without PKCEGHSA-wxw3-q3m9-c3jr · 15 May 2026Fixed in 1.6.2
- LowBetter Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flowsGHSA-2vg6-77g8-24mp · 7 Jul 2026Fixed in 1.6.11
Release note
The section about better-auth of a note shared by several packages.
better-auth
Breaking Changes
- Breaking
Aligned
freshAgecalculation with session creation time instead of update time
Migration:
session.freshAgenow calculates fromcreatedAt. Setsession: { freshAge: 0 }to disable the check entirely.
Features
Added experimental OpenTelemetry instrumentation for endpoints, hooks, middleware, and database operations
Added
resendStrategyoption to reuse existing OTP in email-otp pluginAdded
enableoption for HaveIBeenPwned pluginAdded request metadata to
sendMagicLinkcallbackAdded dedicated
secretoption to OAuth proxy to reduce shared key exposureAdded explicit
organizationIdparameter in team endpointsAdded WeChat social provider
Added
twoFactorPageconfig option for custom 2FA page routing
Bug Fixes
- Deprecated
Deprecated
oidc-providerplugin in favor of@better-auth/oauth-provider Fixed access control indexing type
Added origin check middleware to password reset request
Fixed account cookie comparison to use provider
accountIdinstead of internal idFixed session id generation when using secondary storage without database
Fixed
skipOriginCheckarray handlingFixed misleading rate limit IP warning
Passed
userfield through idToken sign-in body for Apple name supportPreserved custom session fields on focus refresh
Fixed double encoded cookie
Prevented revoked sessions from being restored via database fallback
Resolved duplicate
operationIdin admin plugin endpointsRethrew phone
sendOTPfailures instead of silently swallowing themSet stateless
cookieCachemaxAge to matchsession.expiresInThrew on duplicate email when
autoSignIn: falsewithoutrequireEmailVerificationFixed
accountInfoendpoint to useaccountIdinstead of internal idRestored deprecated
createAdapterand type exports for backwards compatibilityFixed
Responsereturn for HTTP request contextsFixed
throw: truehandling in client session refreshPreserved stale session data on network or server errors
Fixed bundler re-export type resolution with direct imports
Fixed Set-Cookie header splitting with lookahead heuristic
Prioritized
generateId: "uuid"over adaptercustomIdGeneratorFixed date string revival in
safeJSONParsefor pre-parsed objectsFixed postgres migration to use
CREATE INDEXTriggered
sessionSignalafter requesting email change in email-otpFixed generic-oauth to use discovery userinfo endpoint instead of hardcoded URLs
Normalized missing resolver path in last-login-method plugin
Returned additional fields in
/magic-link/verifyFixed OAuth proxy to read callback params from body for
form_postFixed double-hashing of OAuth state when
storeIdentifieris hashedFixed
redirect_urivalidation forprompt=nonein oidc-providerOpted into FedCM to suppress Google GSI deprecation warnings
Filtered null organizations in
listUserInvitationsFixed multi-role user handling in invite and member removal checks
Enforced authorization on SCIM management endpoints and normalized passkey ownership checks
Allowed passwordless users to manage 2FA
Wired
twoFactorTableoption to schemamodelNamePrevented
anyfrom collapsingauth.$Inferand client inference typesFixed
updateUserto not overwrite unrelated username fieldsEnforced username uniqueness in
updateUserUsed non-blocking scrypt for password hashing to avoid blocking the event loop
For detailed changes, see CHANGELOG
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.