Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apollo-passport-mongodb-driver

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-passport-mongodb-driver

mongodb driver for apollo-passport

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-12.5%
Maintainers
1
Weekly downloads
 
Created
Source

apollo-passport-mongodb

Forked from tomitrescak/apollo-passport-mongodb MongoDB native driver for apollo-passport

npm Circle CI Coverage Status MIT License

Copyright (c) 2016 by Gilad Shoham, released under the MIT license.

New Features in this fork (Highlights)

  • Add verifyUserAccount function
  • Add function to add reset password tokens
  • Add update user function
  • Follow emails standard from here: passportjs-profile
  • Add dates for user (dateUpdated, dateAdded, dateRegistered)

Usage

import { MongoClient } from 'mongodb';
import MongoDriver from 'apollo-passport-mongodb-driver';

// However you usually create your mongodb instance
const m = await MongoClient.connect(`mongodb://${host}:${port}/${name}`);

// Pass to apollo passport at creation time
const apolloPassport = new ApolloPassport({
  // along with any other relevant options
  db: new MongoDriver(m)
});

Optional parameters, e.g. if your users table is called something else:

new MongoDriver(r, {
  userTableName: 'users',
  configTableName: 'apolloPassportConfig',
  db: '(override default database given to mongo)'
});

See apollo-passport and apollo-passport-local-strategy for more info.

Create your own DBDriver

This package is fully documented with 100% test coverage. It can be used as a basis for creating other DBDrivers for Apollo Passport.

See also the API Docs, ordered by version and viewable online via rawgit, e.g. v0.0.2 API Docs on RawGit.

Keywords

FAQs

Package last updated on 30 Jan 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc