autheremin

0.0.5 • Public • Published

autheremin

Sets up user authentication in a database in a pretty safe way. Now with bcrypt!

Usage

I'm thinking usage along these lines:

// db must provide get, set, and del methods
var db = require('./db')
var autheremin = require('autheremin')(db)
 
var username = 'antigone'
var password = '7xqJ3b8n'
 
autheremin.create(username, password, function(err) {
  if (err) throw err
  // username/password combination was created successfully
})
 
autheremin.verify(username, password, function(err) {
  if (err) throw err
  // username/password combination was verified against the database
})
 
autheremin.delete(username, function(err) {
  if(err) throw err
  // record with that username deleted from the database
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    2
  • 0.0.4
    1
  • 0.0.3
    1
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i autheremin

Weekly Downloads

6

Version

0.0.5

License

none

Last publish

Collaborators

  • gsf