# What changed in @nestjs/passport

> 10 changes in @nestjs/passport 9 to 12 from its official release notes, upgrade guides and advisories: 5 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-23. HTML: https://unstale.sh/npm/@nestjs/passport/

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

## @nestjs/passport 12

### Breaking changes

- The return type now uses AuthGuardAuthenticateOptions instead of IAuthModuleOptions; overrides returning defaultStrategy will be flagged by TypeScript. (12.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/12.0.0)
- The supported Nest peer dependency range is ^11.0.0 || ^12.0.0; Nest 10 is no longer supported. (12.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/12.0.0)
- The package is now pure ESM with an exports map; import public APIs from the package root instead of relying on legacy shims or deep imports. (12.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/12.0.0)
- Deep imports into build internals are no longer resolvable; import from the package root instead. (12.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/12.0.0)
- CommonJS apps using require('@nestjs/passport') need Node.js 20.19+ or 22.12+ for require(esm), or must upgrade Node or move the app to ESM. (12.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/12.0.0)

### New APIs and options

- A package-root export representing passport.AuthenticateOptions with defaultStrategy explicitly disallowed; use it for getAuthenticateOptions() return values. (12.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/12.0.0)

### Fixes and other changes

- AuthGuard strips defaultStrategy and property before calling passport.authenticate(), preventing module options from colliding with strategy-level options. (12.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/12.0.0)

## @nestjs/passport 10

### New APIs and options

- Allows specifying callback arity when configuring a Passport strategy. (10.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/10.0.0)
- Adds a getRequest method to the IAuthGuard interface. (10.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/10.0.0)

## @nestjs/passport 9

### Fixes and other changes

- The context parameter on IAuthGuard is now typed. (9.0.0) — [release notes](https://github.com/nestjs/passport/releases/tag/9.0.0)
