Necessarily Precedes Mischief
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@ladjs/passport

2.1.0 • Public • Published

passport

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

Passport for Lad

Table of Contents

Install

npm:

npm install @ladjs/passport

yarn:

yarn add @ladjs/passport

Usage

const Passport = require('@ladjs/passport');
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 passport = new Passport(Users, {
  // ...
});
 
const app = new Koa();
app.use(passport.initialize());
app.use(passport.session());

Options

See index.js for configuration defaults and environment flags.

You can customize the field names, see the fields object in index.js.

Contributors

Name Website
Nick Baugh http://niftylettuce.com/
Shaun Warman https://shaunwarman.com/
shadowgate15 https://github.com/shadowgate15

License

MIT © Nick Baugh

Install

npm i @ladjs/passport

DownloadsWeekly Downloads

16

Version

2.1.0

License

MIT

Unpacked Size

20.7 kB

Total Files

12

Last publish

Collaborators

  • avatar
  • avatar
  • avatar