auth-checker

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i auth-checker

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

3.17 kB

Total Files

5

Last publish

Collaborators

  • jexulie