Socket
Socket
Sign inDemoInstall

@ladjs/auth

Package Overview
Dependencies
15
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ladjs/auth

Auth for Lad


Version published
Weekly downloads
1
Maintainers
2
Install size
1.98 MB
Created
Weekly downloads
 

Readme

Source

auth

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

Auth for Lad

Table of Contents

Install

npm:

npm install @ladjs/auth

yarn:

yarn add @ladjs/auth

Usage

const Auth = require('@ladjs/auth');
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 auth = new Auth(Users, {
  // ...
});

const app = new Koa();
app.use(auth.passport.initialize());
app.use(auth.passport.session());

Options

See index.js for configuration defaults and environment flags.

Contributors

NameWebsite
Nick Baughhttp://niftylettuce.com/

License

MIT © Nick Baugh

Keywords

FAQs

Last updated on 02 Dec 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc