https://github.com/ladjs/passport
Passport for Lad
https://github.com/ladjs/passport
Last synced: 3 months ago
JSON representation
Passport for Lad
- Host: GitHub
- URL: https://github.com/ladjs/passport
- Owner: ladjs
- License: mit
- Created: 2017-11-22T00:03:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T11:21:53.000Z (over 1 year ago)
- Last Synced: 2025-06-03T08:45:04.693Z (7 months ago)
- Language: JavaScript
- Homepage: https://lad.js.org
- Size: 431 KB
- Stars: 7
- Watchers: 7
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @ladjs/passport
[](https://github.com/ladjs/passport/actions/workflows/ci.yml)
[](https://github.com/sindresorhus/xo)
[](https://github.com/prettier/prettier)
[](https://lass.js.org)
[](LICENSE)
> Passport for Lad
## Table of Contents
* [Install](#install)
* [Usage](#usage)
* [Strategies](#strategies)
* [Options](#options)
* [Contributors](#contributors)
* [License](#license)
## Install
[npm][]:
```sh
npm install @ladjs/passport
```
## Usage
```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());
```
## Strategies
Currently supported strategies:
* Local (email)
* Apple (Sign in with Apple)
* GitHub
* Google
* OTP
## Options
See [index.js](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](index.js).
## Contributors
| Name | Website |
| ---------------- | --------------------------------- |
| **Nick Baugh** | |
| **Shaun Warman** | |
| **shadowgate15** | |
## License
[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)
##
[npm]: https://www.npmjs.com/