norman-auth-server

Angular module to handle user authentication

Usage no npm install needed!

<script type="module">
  import normanAuthServer from 'https://cdn.skypack.dev/norman-auth-server';
</script>

README

norman-auth-server

Norman authentication module.

To install run:

  npm install norman-auth-server

To include in your express app:

  var app = express();
  ...
  require('norman-auth-server')(app);

To check the authentication in your api use:

  var auth = require('norman-auth-server');
  app.use('/api', auth.isAuthenticated(), ...);
  app.use('/api/admin', auth.hasRole('admin'), ...);