@nest-middlewares/passport
v10.0.0
Published
NestJS Middleware for Passport
Downloads
40
Readme
Nest Middlewares - Passport
This is the Nest Middleware wrapper around passport.
Installation
@nest-middlewares/passport
is available from NPM. You can install it with this command:
npm install --save @nest-middlewares/passport
Usage
import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
import { PassportInitializeMiddleware, PassportSessionMiddleware } from '@nest-middlewares/passport';
import { AppController } from './app.controller';
@Module(...)
export class AppModule implements NestModule {
configure(consumer: MiddlewaresConsumer) {
consumer
.apply(PassportInitializeMiddleware)
.forRoutes(AppController)
.apply(PassportSessionMiddleware)
.forRoutes(AppController)
}
}