# What changed in @thallesp/nestjs-better-auth

> 36 changes in @thallesp/nestjs-better-auth 2 from its official release notes, upgrade guides and advisories: 1 breaking, 1 deprecations, 20 new APIs and options. Each one cited. Sources checked 2026-10-25. HTML: https://unstale.sh/npm/@thallesp/nestjs-better-auth/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @thallesp/nestjs-better-auth 2

### Breaking changes

- Middleware typing is decoupled from Express, so its types are no longer tied to Express. (2.5.2) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.2)

### Deprecations

- Deprecates disableBodyParser in favor of configurable bodyParser and rawBody options. (2.5.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.0)

### New APIs and options

- Adds support for NestJS v12. (2.8.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.8.0)
- Adds a decorator for routes that require an active organization. (2.7.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.7.0)
- Registers a handler to run after creating the specified model. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Registers a handler to run after deleting the specified model. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Registers a handler to run after updating the specified model. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Registers a handler to run before creating the specified model. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Registers a handler to run before deleting the specified model. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Registers a handler to run before updating the specified model. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Marks a class for Better Auth database lifecycle hooks with NestJS dependency injection. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Set databaseHooks: {} in betterAuth(...) config to enable the database hook decorators. (2.6.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.0)
- Adds the InferSession<T> type for plugin-aware session typing. (2.5.3) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.3)
- Introduces a configurable bodyParser option as part of the body parser configuration refactor. (2.5.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.0)
- Adds decorators for checking permissions. (2.5.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.0)
- Introduces a configurable rawBody option as part of the body parser configuration refactor. (2.5.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.0)
- Adds the enableRawBodyParser option for webhook signature verification. (2.4.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.4.0)
- Adds global prefixes exclusion and uses MiddlewareConsumer. (2.3.1) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.3.1)
- Adds support for the organization plugin. (2.3.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.3.0)
- Adds the disableControllers option. (2.2.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.0)
- Adds a middleware option to AuthModule. (2.2.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.0)
- Adds websocket support. (2.2.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.0)

### Behavior and default changes

- Refines Fastify body limit parsing and the BodyParserLimit types. (2.7.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.7.0)
- @nestjs/websockets is now an optional peer dependency, so applications that do not use it need not install it. (2.2.1) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.1)

### Tooling

- The TypeScript version range in package.json was updated, changing which TypeScript versions are supported. (2.5.4) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.4)

### Fixes and other changes

- Fixes exception bodies produced by the auth guard. (2.7.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.7.0)
- Fixed CORS handling for Fastify Better Auth routes. (2.6.1) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.6.1)
- Fixes duplicate Fastify CORS handling for Better Auth trustedOrigins. (2.5.1) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.5.1)
- GraphQL is now fully optional, so developers can use the package without requiring GraphQL. (2.2.6) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.6)
- Fixes 404 issues when using a globalPrefix on NestJS. (2.2.5) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.5)
- Made @nestjs/graphql a truly optional peer dependency, so applications that do not use GraphQL do not need to install it. (2.2.4) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.4)
- Fallback now handles Better Auth or middleware errors. (2.2.3) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.3)
- Fixed configuring controllers when the module is configured asynchronously. (2.2.2) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.2)
- The body parser middleware integration in AuthModule was updated. (2.2.1) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.1)
- SkipBodyParsingMiddleware now uses the configured basePath instead of a hardcoded value. (2.2.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.0)
- Fixes role checks when multiple roles are separated by a comma. (2.2.0) — [release notes](https://github.com/ThallesP/nestjs-better-auth/releases/tag/v2.2.0)
