auth-checker
v1.0.1
Published
A Middleware that checks if user is authenticated.
Downloads
12
Maintainers
Readme
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...
}) ;