Home

Awesome

@ladjs/passport

build status code style styled with prettier made with lass license

Passport for Lad

Table of Contents

Install

npm:

npm install @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());

Strategies

Currently supported strategies:

Options

See index.js for configuration defaults and environment flags.

You can customize the field names and phrases, see the fields and phrases objects in index.js.

Contributors

NameWebsite
Nick Baughhttp://niftylettuce.com/
Shaun Warmanhttps://shaunwarman.com/
shadowgate15https://github.com/shadowgate15

License

MIT © Nick Baugh