Packages

better-auth

1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed

Your version

1.1.0

20 Dec 2024Where it was published

1.7.27 is the newest release of 1.x.

In short

11 new13 fixed

Security

18 advisories affect 1.1.0; 1.6.13 fixes them

13 more

Release note

New Features

  • OIDC Plugin: An experimental new plugin that lets you create your own OIDC-compliant server. Checkout plugin docs

  • Enterprise SSO Provider: A new plugin that allows you to sign in users with OIDC servers configured by users. It handles provisioning new users, integrates with the organization plugin, and more. (SAML support coming soon!) Checkout plugin docs

  • Hooks: a new API for hook. You no longer need to create a plugin—these allow you to modify any requests and responses within Better Auth. Check out Hook Docs

  • Better Auth Utils: We made a typescript auth utility and Better Auth now depends on that for auth related utility needs.

  • Stop Impersonating API: Admins can now stop impersonating a user and return to their session without logging out and back in. .

Improvements and API Changes

  • Endpoints that previously returned the entire user object now only return a token. This change allows for storing sensitive fields in the user table and eliminates unnecessary returned data. As a result, all endpoints, except /get-session, now enforce this.

  • Expo plugin now requires a storage to be passed instead of defaulting to secure storage.

  • By default the bearer plugin now accepts unsigned tokens and provides an option to require signed tokens only.

  • User deletion now offers an improved user experience. It introduces a callback URL to redirect users to custom pages after their account is removed. Additionally, it accepts a token, to enable custom flows.

  • Replaced Consola with a custom logger for better compatibility with Cloudflare deployments.

  • Export available provider types

Bug Fixes

  • Get-config paths for missing slash for /lib/server

  • Remove nanoid dependcy and genreate id manually

  • Export passkey only on its own route

  • Ensure that error messages thrown from a DB hook are returned unchanged on social callback

  • Skip updating userinfo on oauth callback

  • Protect phone number login with 2fa

  • Email-otp on signup breaking when emailVerification is requried

  • Sign In with Apple With ID Token not work

  • Type seralization error

  • ActiveOrgId should always refer to the ID instead of the slug

  • bearer: Pre-check token signature to ignore if invalid

  • jwt: Pass session on definePayload callback

  • social: OAuth should find a user based on a provider returned account id

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.