/couchdb-user-account

CouchDb User Account Model

Primary LanguageJavaScript

couchdb-user-account model

build status

This is a user account model module for applications looking to leverage couchdb _users database to manage application users as well as create a database per user and properly set the security properties giving the user account sole access to their datastore.

Requirements

Install

npm install couch-user-account

Usage

var account = require('couch-user-account')({ 
  protocol: 'http',
  host: 'localhost:5984',
  auth: 'foo:bar'
})

// register account

account.register({
  name: "foo",
  password: "beep",
  email: "foo@beep.com"
}, function(err, res) {
  console.log(res);
})

API

TODO

  • register
  • login
  • remove
  • setup
  • findByEmail
  • changePassword
  • createCode

Test

npm test

Support

  • create an issue on github