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

clever-auth

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clever-auth

CleverStack Authentication Module

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51
increased by537.5%
Maintainers
2
Weekly downloads
 
Created
Source

CleverStack Authentication Module

NPM version GitHub version Dependency Status devDependency Status Code Climate Build Status Coverage NPM downloads Built with Grunt

CleverStack NodeJS Authentication Module

This CleverStack Module provides users & authentication for the node-seed, it works with either the Object Relational Mapper (clever-orm) AND the Object Document Mapper (clever-odm) Module's.

Out of the box you can use this module with MongoDB, MySQL, MariaDB, PostgreSQL or SQLite! And because this module uses Redis for session storage it's also scalable.

Documentation

See cleverstack.io for more detailed information on the Node seed or visit the Getting Started Guide

Configuration

You can use this module with either the clever-orm (ORM) or clever-odm (ODM) modules, simply add the following config to your /config/local.json (or into your global.json for all environments, or in whatever environment you are using).

Grunt

  1. grunt prompt:cleverAuthConfig can be used to generate your config for any environment you want
  2. grunt prompt:cleverAuthSeed can be used to add/edit users inside your seed data

Configuration files

// For ODM
"clever-auth": {
  	"driver": "ODM"
}

// For ORM
"clever-auth": {
  	"driver": "ORM"
}

// Using In-Memory Session Storage
"clever-auth": {
  	"sessionStoreDriver": "in-memory"
}

// Using Redis for Session Storage
"clever-auth": {
  	"sessionStoreDriver": "redis",
    "redis": {
        "host": "localhost",
        "port": "6379",
        "prefix": "",
        "key": ""
    }
}

// Using Memcache for Session Storage
"clever-auth": {
  	"sessionStoreDriver": "redis",
    "memcache": {
        "host": "localhost",
        "port": "11211",
        "prefix": ""
    }
}

Setup

Using CLI

  1. Run clever install clever-auth and follow the prompts
  2. Run clever serve to start your application.

Without CLI

  1. Clone this repo (or untar it there) into your modules folder (ie modules/clever-auth)
  2. Add 'clever-auth' to the bundledDependencies array of your app's package.json.
  3. Run grunt prompt:cleverAuthConfig and fill in your configuration options.
  4. Run grunt prompt:cleverAuthSeed and create your default user.
  5. Run grunt db to rebase and seed the data.
  6. Run grunt server to start your application.

Rebuilding (rebasing) and Seeding your database

  1. grunt db:rebaseOrm will rebase your ORM database (delete and completely replace all tables)
  2. grunt db:seedOrm will seed data into your ORM database
  3. grunt db:orm will perform both of the above tasks

Note: You can just run grunt db, grunt db:rebase and grunt db:seed but if the ODM module is installed it will perform these operations on that DB as well (which might be exactly what your looking for)

Test Account Credentials

username: test@cleverstack.io
password: clever

License

See our LICENSE

Keywords

FAQs

Package last updated on 14 Feb 2015

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