1.0.1 • Published 6 years ago

auth-checker v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

auth-checker

Passport.js Authentication Checking Middleware.

Checks if user is authenticated and redirects to desired routes.

Installation

$ npm install auth-checker

Usage

    var authchecker = require('auth-checker');

    // use middleware on routes to check authentication
    // (success route is optional)
    app.get('/myprecious', authchecker('/routeToHell', '/routeToMyPrecious'), (req, res) => {
        // do your stuff...
    }) ;

License

MIT