@nest-middlewares/passport

NestJS Middleware for Passport

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
24412May 9, 2021Nov 23, 2017Minified + gzip package size for @nest-middlewares/passport in KB

Readme

Nest Middlewares - Passport

Coverage Status

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)
    }
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.