unstale

npm / @nestjs/passport

@nestjs/passport

What changed in @nestjs/passport 9 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.

5 breaking3 new APIs and options2 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.2.4 on npm

@nestjs/passport 127 changes

Breaking changes 5

  • The return type now uses AuthGuardAuthenticateOptions instead of IAuthModuleOptions; overrides returning defaultStrategy will be flagged by TypeScript.

    12.0.0release notes

  • The supported Nest peer dependency range is ^11.0.0 || ^12.0.0; Nest 10 is no longer supported.

    12.0.0release notes

  • 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.0release notes

  • Deep imports into build internals are no longer resolvable; import from the package root instead.

    12.0.0release notes

  • 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.0release notes

New APIs and options 1

  • A package-root export representing passport.AuthenticateOptions with defaultStrategy explicitly disallowed; use it for getAuthenticateOptions() return values.

    12.0.0release notes

Fixes and other changes 1

  • AuthGuard strips defaultStrategy and property before calling passport.authenticate(), preventing module options from colliding with strategy-level options.

    12.0.0release notes

@nestjs/passport 102 changes

New APIs and options 2

  • Allows specifying callback arity when configuring a Passport strategy.

    10.0.0release notes

  • Adds a getRequest method to the IAuthGuard interface.

    10.0.0release notes

@nestjs/passport 91 changes

Fixes and other changes 1

  • The context parameter on IAuthGuard is now typed.

    9.0.0release notes