Skip to content

wurde/auth-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auth-check

Authentication check for Express apps.

Getting started

Add the package to your project using the npm ecosystem:

$ npm install auth-check --save

Partial example integration within an Express app:

const auth_check = require('auth-check')

app.locals.admin_auth_check = auth_check({
  role: 'admin',
  redirect: '/admin/login'
})

app.get('/', app.locals.admin_auth_check, AdminController.home)

Changelog

Get the project's history in CHANGELOG.md.

Maintainer

Andy Bettisworth andy@accreu.com https://andybettisworth.com

License

This project is released under the MIT License.

About

Authentication check for Express apps.

Resources

License

Stars

Watchers

Forks

Packages

No packages published