Passport for Lad
npm install @ladjs/passport




> Passport for Lad
* Install
* Usage
* Strategies
* Options
* Contributors
* License
[npm][]:
``sh`
npm install @ladjs/passport
`js
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());
`
Currently supported strategies:
* Local (email)
* Apple (Sign in with Apple)
* GitHub
* Google
* OTP
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.
| Name | Website |
| ---------------- | --------------------------------- |
| Nick Baugh |
| Shaun Warman |
| shadowgate15 |
##
[npm]: https://www.npmjs.com/