unstale

npm / @thallesp/nestjs-better-auth

@thallesp/nestjs-better-auth

What changed in @thallesp/nestjs-better-auth 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.

1 breaking1 deprecations20 new APIs and options2 behavior and defaults1 tooling11 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.7 on npm

@thallesp/nestjs-better-auth 236 changes

Breaking changes 1

  • Middleware typing is decoupled from Express, so its types are no longer tied to Express.

    2.5.2release notes

Deprecations 1

  • Deprecates disableBodyParser in favor of configurable bodyParser and rawBody options.

    2.5.0release notes

New APIs and options 20

  • Adds support for NestJS v12.

    2.8.0release notes

  • Adds a decorator for routes that require an active organization.

    2.7.0release notes

  • Registers a handler to run after creating the specified model.

    2.6.0release notes

  • Registers a handler to run after deleting the specified model.

    2.6.0release notes

  • Registers a handler to run after updating the specified model.

    2.6.0release notes

  • Registers a handler to run before creating the specified model.

    2.6.0release notes

  • Registers a handler to run before deleting the specified model.

    2.6.0release notes

  • Registers a handler to run before updating the specified model.

    2.6.0release notes

  • Marks a class for Better Auth database lifecycle hooks with NestJS dependency injection.

    2.6.0release notes

  • Set databaseHooks: {} in betterAuth(...) config to enable the database hook decorators.

    2.6.0release notes

  • Adds the InferSession<T> type for plugin-aware session typing.

    2.5.3release notes

  • Introduces a configurable bodyParser option as part of the body parser configuration refactor.

    2.5.0release notes

  • Adds decorators for checking permissions.

    2.5.0release notes

  • Introduces a configurable rawBody option as part of the body parser configuration refactor.

    2.5.0release notes

  • Adds the enableRawBodyParser option for webhook signature verification.

    2.4.0release notes

  • Adds global prefixes exclusion and uses MiddlewareConsumer.

    2.3.1release notes

  • Adds support for the organization plugin.

    2.3.0release notes

  • Adds the disableControllers option.

    2.2.0release notes

  • Adds a middleware option to AuthModule.

    2.2.0release notes

  • Adds websocket support.

    2.2.0release notes

Behavior and default changes 2

  • Refines Fastify body limit parsing and the BodyParserLimit types.

    2.7.0release notes

  • @nestjs/websockets is now an optional peer dependency, so applications that do not use it need not install it.

    2.2.1release notes

Tooling 1

  • The TypeScript version range in package.json was updated, changing which TypeScript versions are supported.

    2.5.4release notes

Fixes and other changes 11

  • Fixes exception bodies produced by the auth guard.

    2.7.0release notes

  • Fixed CORS handling for Fastify Better Auth routes.

    2.6.1release notes

  • Fixes duplicate Fastify CORS handling for Better Auth trustedOrigins.

    2.5.1release notes

  • GraphQL is now fully optional, so developers can use the package without requiring GraphQL.

    2.2.6release notes

  • Fixes 404 issues when using a globalPrefix on NestJS.

    2.2.5release notes

  • Made @nestjs/graphql a truly optional peer dependency, so applications that do not use GraphQL do not need to install it.

    2.2.4release notes

  • Fallback now handles Better Auth or middleware errors.

    2.2.3release notes

  • Fixed configuring controllers when the module is configured asynchronously.

    2.2.2release notes

  • The body parser middleware integration in AuthModule was updated.

    2.2.1release notes

  • SkipBodyParsingMiddleware now uses the configured basePath instead of a hardcoded value.

    2.2.0release notes

  • Fixes role checks when multiple roles are separated by a comma.

    2.2.0release notes