Giter Site home page Giter Site logo

johnmahugu / pouchdb-authentication Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pouchdb-community/pouchdb-authentication

0.0 1.0 0.0 1.96 MB

User authentication plugin for PouchDB and CouchDB.

License: Apache License 2.0

JavaScript 98.67% TypeScript 1.33%

pouchdb-authentication's Introduction

PouchDB Authentication

Build Status Greenkeeper badge npm version

PouchDB Authentication logo by nickcolley

Easy user authentication for PouchDB/CouchDB.

var db = new PouchDB('http://mysite:5984/mydb', {skip_setup: true});
db.logIn('batman', 'brucewayne').then(function (batman) {
  console.log("I'm Batman.");
  return db.logOut();
});

Overview

You know what's hard? Security. You know what makes security really easy? CouchDB.

That's right, CouchDB is more than a database: it's also a RESTful web server with a built-in authentication framework. And it boasts some top-notch security features:

  • salts and hashes passwords automatically with PBKDF2
  • stores a cookie in the browser
  • refreshes the cookie every 10 minutes (default)

And best of all, CouchDB does it with good ol'-fashioned HTTP. Just open up the network tab and watch the JSON fly back and forth.

To get started, just install CouchDB, throw in a little SSL, and you've got everything you need for your site's authentication.

Project status

This plugin uses vanilla CouchDB. The goal is to give you a lightweight authentication API that doesn't require anything fancy โ€“ no additional server daemons, no third-party providers, just straight-up Pouch and Couch.

So this is more of a reference implementation than an all-in-one solution. If there's a feature missing that you need, you will probably need to write a custom server (see the CouchDB Authentication recipes section for details).

Since version 1.0.0, this plugin does support Node.js.

Using PouchDB Authentication

Changelog

PouchDB Authentication follows semantic versioning. To see a changelog with all PouchDB Authentication releases, check out the Github releases page.

Contributing

We use standard-version for release versioning along with Angular-style commit messages to automate the changelog generation. To help you make good commit messages, you are advised to install and use commitizen.

PouchDB Authentication is heavily tested, so you'll also want to check out the testing guide.

pouchdb-authentication's People

Contributors

nolanlawson avatar ptitjes avatar greenkeeper[bot] avatar tlvince avatar broerse avatar richardlitt avatar greenkeeperio-bot avatar bigbluehat avatar silverbackdan avatar hadrien-toma avatar jrhicks avatar tarr11 avatar mrzor avatar e111077 avatar techwizeric avatar yfr avatar garth avatar jgillich avatar luandro avatar mciparelli avatar nilock avatar svnlto avatar skiqh avatar

Watchers

kesh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.