Socket
Socket
Sign inDemoInstall

izi-auth

Package Overview
Dependencies
86
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    izi-auth

Module for handling passport authentications in izisoft applications


Version published
Maintainers
1
Install size
4.25 MB
Created

Readme

Source

izi-auth

Simple authentication management module for izisoft web application.

Installation

$ npm install izi-auth

Requirements

Module operates on provided mongoose user model that should realize following schema:

User: {
    _id: ObjectId,
    provider: String,
    email: String,
    password: String,
    id: String,
    token: String
    name: String,
    generateHash: function(password),
    verifyPassword: function(password),
    initialize: function(request || undefined)
}

To initialize strategies module reads given izi-config object which should contain:

Config: {
    logger: Object,
    auth: {
        url: {
            success: String || "/",
            login: String,
            signup: String
        },
        flash: Boolean || true,
        oauth: {
            facebook: {
                id: String,
                secret: String,
                url: String,
                opts: Object
            },
            google: {
                id: String,
                secret: String,
                url: String,
                opts: Object
            },
            twitter: {
                id: String,
                secret: String,
                url: String,
                opts: Object || {}
            }
        }
    }
}

Usage

var auth = require('izi-auth');
auth.init(UserModel, config);
auth.use(app);

Keywords

FAQs

Last updated on 15 Mar 2018

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