Packages

better-auth

1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed

Your version

1.6.0

6 Apr 2026Where it was published

1.7.27 is the newest release of 1.x.

In short

1 breaking1 deprecated9 new40 fixed

  • Breaking

    Aligned freshAge calculation with session creation time instead of update time

  • Deprecated

    Deprecated oidc-provider plugin in favor of @better-auth/oauth-provider

Security

Fixes 1 advisory that affected 1.5.6

13 advisories affect 1.6.0; 1.7.7 fixes them

8 more

Release note

The section about better-auth of a note shared by several packages.

better-auth

Breaking Changes

  • Breaking

    Aligned freshAge calculation with session creation time instead of update time

Migration: session.freshAge now calculates from createdAt. Set session: { freshAge: 0 } to disable the check entirely.

Features

  • Added experimental OpenTelemetry instrumentation for endpoints, hooks, middleware, and database operations

  • Added resendStrategy option to reuse existing OTP in email-otp plugin

  • Added enable option for HaveIBeenPwned plugin

  • Added request metadata to sendMagicLink callback

  • Added dedicated secret option to OAuth proxy to reduce shared key exposure

  • Added explicit organizationId parameter in team endpoints

  • Added WeChat social provider

  • Added twoFactorPage config option for custom 2FA page routing

Bug Fixes

  • Deprecated

    Deprecated oidc-provider plugin 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 accountId instead of internal id

  • Fixed session id generation when using secondary storage without database

  • Fixed skipOriginCheck array handling

  • Fixed misleading rate limit IP warning

  • Passed user field through idToken sign-in body for Apple name support

  • Preserved custom session fields on focus refresh

  • Fixed double encoded cookie

  • Prevented revoked sessions from being restored via database fallback

  • Resolved duplicate operationId in admin plugin endpoints

  • Rethrew phone sendOTP failures instead of silently swallowing them

  • Set stateless cookieCache maxAge to match session.expiresIn

  • Threw on duplicate email when autoSignIn: false without requireEmailVerification

  • Fixed accountInfo endpoint to use accountId instead of internal id

  • Restored deprecated createAdapter and type exports for backwards compatibility

  • Fixed Response return for HTTP request contexts

  • Fixed throw: true handling in client session refresh

  • Preserved 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 adapter customIdGenerator

  • Fixed date string revival in safeJSONParse for pre-parsed objects

  • Fixed postgres migration to use CREATE INDEX

  • Triggered sessionSignal after requesting email change in email-otp

  • Fixed 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/verify

  • Fixed OAuth proxy to read callback params from body for form_post

  • Fixed double-hashing of OAuth state when storeIdentifier is hashed

  • Fixed redirect_uri validation for prompt=none in oidc-provider

  • Opted into FedCM to suppress Google GSI deprecation warnings

  • Filtered null organizations in listUserInvitations

  • Fixed 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 twoFactorTable option to schema modelName

  • Prevented any from collapsing auth.$Infer and client inference types

  • Fixed updateUser to not overwrite unrelated username fields

  • Enforced username uniqueness in updateUser

  • Used 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.