Skip to content

ladjs/passport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 23, 2024
528f621 · Apr 23, 2024

History

73 Commits
Jun 6, 2022
Jun 6, 2022
Jun 2, 2022
May 30, 2022
Nov 22, 2017
Jun 7, 2022
Jun 6, 2022
May 30, 2022
Jun 6, 2022
May 30, 2022
Nov 22, 2017
Jun 2, 2022
Jun 2, 2022
Nov 22, 2017
Jun 7, 2022
Apr 23, 2024
Apr 23, 2024

Repository files navigation

@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:

  • Local (email)
  • Apple (Sign in with Apple)
  • GitHub
  • Google
  • OTP

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

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

License

MIT © Nick Baugh