This package has been deprecated

Author message:

Please use @ladjs/passport instead

@ladjs/auth

0.0.5 • Public • Published

auth

build status code coverage code style styled with prettier made with lass license

Auth for Lad

Table of Contents

Install

npm:

npm install @ladjs/auth

yarn:

yarn add @ladjs/auth

Usage

const Auth = require('@ladjs/auth');
const koa = require('koa');
const mongoose = require('mongoose');
const passportLocalMongoose = require('passport-local-mongoose');

const User = new mongoose.Schema();
User.plugin(passportLocalMongoose, {
  // ...
});
const Users = mongoose.model('User', UserSchema);

const auth = new Auth(Users, {
  // ...
});

const app = new Koa();
app.use(auth.passport.initialize());
app.use(auth.passport.session());

Options

See index.js for configuration defaults and environment flags.

Contributors

Name Website
Nick Baugh http://niftylettuce.com/

License

MIT © Nick Baugh

Package Sidebar

Install

npm i @ladjs/auth

Weekly Downloads

1

Version

0.0.5

License

MIT

Last publish

Collaborators

  • titanism
  • shadowgate15
  • niftylettuce
  • shaunwarman
  • spence-s