# pouchdb-authentication

> PouchDB Authentication

Latest version **1.1.3** (published 2018-05-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install pouchdb-authentication
pnpm add pouchdb-authentication
yarn add pouchdb-authentication
bun add pouchdb-authentication
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2018-05-19 |
| First published | 2014-05-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 231 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 776 |
| Author | Nolan Lawson |
| Maintainers | nolanlawson, ptitjes |
| Keywords | pouch, pouchdb, authentication, couch, couchdb |

## Links

- npm: https://www.npmjs.com/package/pouchdb-authentication
- Repository: https://github.com/pouchdb-community/pouchdb-authentication
- Homepage: https://github.com/pouchdb-community/pouchdb-authentication#readme
- Issues: https://github.com/pouchdb-community/pouchdb-authentication/issues
- npm.io page: https://npm.io/package/pouchdb-authentication

## Dependencies (7)

- [inherits](https://npm.io/package/inherits.md) 2.0.3
- [url-join](https://npm.io/package/url-join.md) 4.0.0
- [url-parse](https://npm.io/package/url-parse.md) 1.2.0
- [pouchdb-ajax](https://npm.io/package/pouchdb-ajax.md) ~6.4.0
- [pouchdb-utils](https://npm.io/package/pouchdb-utils.md) ~6.4.0
- [pouchdb-promise](https://npm.io/package/pouchdb-promise.md) ~6.4.0
- [pouchdb-binary-utils](https://npm.io/package/pouchdb-binary-utils.md) ~6.4.0

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2018-05-19
- 1.1.2 — 2018-02-03
- 1.1.1 — 2018-01-20
- 1.1.0 — 2017-12-25
- 1.0.0 — 2017-12-18
- 0.5.5 — 2016-09-05
- 0.5.4 — 2016-08-31
- 0.5.3 — 2016-07-05
- 0.5.2 — 2016-06-30
- 0.5.1 — 2016-05-02
- 0.5.0 — 2016-05-02
- 0.4.3 — 2016-01-31
- 0.4.2 — 2015-09-25
- 0.4.1 — 2015-07-18
- 0.4.0 — 2015-05-11
- … 14 more at https://npm.io/package/pouchdb-authentication/versions

## README

PouchDB Authentication
=====

[![Build Status](https://travis-ci.org/pouchdb-community/pouchdb-authentication.svg?branch=master)](https://travis-ci.org/pouchdb-community/pouchdb-authentication)
[![Greenkeeper badge](https://badges.greenkeeper.io/pouchdb-community/pouchdb-authentication.svg)](https://greenkeeper.io/)
[![npm version](https://img.shields.io/npm/v/pouchdb-authentication.svg)](https://www.npmjs.com/package/pouchdb-authentication)

<img alt="PouchDB Authentication logo by nickcolley" title="PouchDB Authentication logo by nickcolley" width="150px" src="https://raw.githubusercontent.com/pouchdb-community/pouchdb-authentication/master/docs/logo.png"/>

Easy user authentication for PouchDB/CouchDB.

```js
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](https://en.wikipedia.org/wiki/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](https://wiki.apache.org/couchdb/How_to_enable_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 &ndash; 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][recipes] section for details).

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


Using PouchDB Authentication
------

* [Setup](https://github.com/pouchdb-community/pouchdb-authentication/blob/master/docs/setup.md)
* [API](https://github.com/pouchdb-community/pouchdb-authentication/blob/master/docs/api.md)
* [CouchDB Authentication recipes][recipes]


Changelog
------

PouchDB Authentication follows [semantic versioning](http://semver.org/). To see a changelog with all PouchDB Authentication releases, check out the [Github releases page](https://github.com/pouchdb-community/pouchdb-authentication/releases).


Contributing
------

We use [standard-version](https://github.com/conventional-changelog/standard-version) for release versioning along with [Angular-style commit messages](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit) to automate the changelog generation. To help you make good commit messages, you are advised to install and use [commitizen](https://github.com/commitizen/cz-cli).

PouchDB Authentication is heavily tested, so you'll also want to check out the [testing guide](https://github.com/pouchdb-community/pouchdb-authentication/blob/master/TESTING.md).

[recipes]: https://github.com/pouchdb-community/pouchdb-authentication/blob/master/docs/recipes.md

---
_Source: https://npm.io/package/pouchdb-authentication · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
