Packages

better-auth

1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed

Your version

1.4.9

23 Dec 2025Where it was published

1.7.27 is the newest release of 1.x.

In short

1 breaking1 deprecated25 new1 faster53 fixed2 internal

  • Breaking

    admin: Prevent impersonating admins by default

  • Deprecated

    sso: Deprecate trustEmailVerified

Security

Fixes 1 advisory that affected 1.4.8

13 advisories affect 1.4.9; 1.7.7 fixes them

8 more

Release note

Features

  • Add ctx.isTrustedDomain helper

  • Drizzle pg supports JSON

  • Add Refresh Token Support to Kick OAuth Provider

  • Add additionalFields option in verification table schema

  • Add patreon social provider

  • Add a global backgroundTasks config option to defer actions like sending email and updates to run after response is sent

  • Breaking

    admin: Prevent impersonating admins by default

  • admin: Add support role with permissions for user updates and enforce role change validation

  • expo: Last-login-method client plugin

  • multi-session: Allow to infer additional fields

  • multi-session: Allow to infer additional fields "

  • oauth-provider: An oauth 2.1 compliant plugin

  • oauth-proxy: Add expirty timestamp for encrypted tokens

  • one-time-token: Support setting session cookie on ott verify

  • organization: Allow invited users to see organization name

  • phone-number: Add password length validation for reset functionality

  • saml: Assertion timestamp validation with per-provider clock skew

  • saml: Validate SAML crypto algorithms during initial phase

  • saml: Enforce one-time use of SAML assertions

  • saml: Reject deprecated SAML signature and digest algorithms

  • saml: Reject deprecated SAML signature and digest algorithms

  • sso: Use domain verified flag to trust providers automatically

  • sso: Add InResponseTo validation

  • sso: Add OIDC discovery

  • sso: Add URL normalization and validation to all discovery URLs

Bug Fixes

  • Add helper types to exports

  • Avoid throwing on client side

  • Export organization plugin types

  • Pathname should be normalized when basePath is set to root

  • Prematurely deleting active sessions in secondary storage

  • Make sure non-chunked session data cookie is cleared

  • Array field handling across adapters and schema generation

  • StoreStateStrategy default to database if provided

  • Should always remove 2FA verification token after successful verification

  • Prevent stateless refresh with database configured

  • Revert token masking in listSessions route

  • Compatible with openapi 3.1

  • Properly merge updated data in account cookie

  • Preserve = padding in parsed cookies

  • Unify SSO/OAuth account linking and add domain-based org assignment to all sign-in flows

  • Respect BETTER_AUTH_TRUSTED_ORIGINS env variable

  • Delete verifications with hooks

  • Respect IP headers in dev/test environments

  • Trusted origins resolving

  • Update-user breaking during stateless auth

  • Export necessary adapter types

  • Use operator in list members where clause

  • Don't set state query param if state is not provided

  • Correct wildcard pattern matching for trustedOrigins

  • adapter: Add logger creation in adapter factory

  • adapter: Allow run internal adapter outside context

  • adapter: Apply customTransformInput to where clause values

  • admin: Clear admin session cookie on stopImpersonating

  • api-key: Check metadata is enabled for api key update endpoint

  • api-key: Prevent id update error with MongoDB adapter

  • auth: Respect trustedOrigins when baseURL is inferred

  • cli: secret generates empty

  • cli: Deduplicate drizzle schema relationships

  • cli: Cmd info --json unexpected exit with 1

  • cli: Cmd info --json unexpected exit with 1

  • client: Set session data on refreshManager

  • cognito: Use %20 encoding for scopes instead of +

  • core: Allow returning null in getUserInfo in provider options

  • db: Correctly unwrap validator result in schema parsing

  • expo: Add missing matcher paths

  • generic-oauth: Ensure encryptOAuthTokens is respected in account linking flow

  • kysely: Wrong affected row count in updateMany & deleteMany

  • line: Enforce nonce

  • magic-link: Handle query params in errorCallbackUrl

  • oidc: Compatibility with exact-optional-property

  • openapi: Mark /get-session response as nullable

  • organization: Validate role existence in inviteMember endpoint

  • organization: Allow internal organization creation when disabled for client

  • passkey: Use deleteVerificationByIdentifier instead of deleteVerificationValue

  • prisma: Use findFirst instead of findMany for findOne

  • prisma-adapter: Extract id to root level for delete operations

  • saml: Enforce trusted provider check

  • saml: Remove signature validation bypass

  • sso: Safely parse provider configs on registration

  • Deprecated

    sso: Deprecate trustEmailVerified

  • sso: Enforce domain verification in assignOrganizationByDomain

  • stripe: Update subscriptionId to use Stripe id

  • username: Await username validator

Performance

  • Add index on organizations slug field

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.