Neo4J TokenStore for Passwordless
npm install passwordless-neo4jstore[![NPM version][npm-version-image]][npm-url]
[![MIT License][license-image]][license-url]

This module provides token storage for Passwordless, a node.js module for express that allows website authentication without password using verification through email or other means. Visit the project's website https://passwordless.net for more details.
Tokens are stored in a Neo4J database and are hashed and salted using bcryptjs.
First, install the module:
$ npm install passwordless-neo4jstore --save
Afterwards, follow the guide for Passwordless. A typical implementation may look like this:
``javascript
const passwordless = require('passwordless');
const Neo4jStore = require('passwordless-neo4jstore');
const neo4j = require('neo4j-driver').v1
var neo4jUrl = 'bolt://localhost:7687';
passwordless.init(new Neo4jStore(neo4jUrl, neo4j.auth.basic('
passwordless.addDelivery(
function(tokenToSend, uidToSend, recipient, callback) {
// Send out a token
});
app.use(passwordless.sessionSupport());
app.use(passwordless.acceptToken());
`
Make sure an instance of Neo4J is running. One way to do that is via Docker.
docker run -d -p 127.0.0.1:7687:7687 --env NEO4J_AUTH=neo4j/graphtastic neo4j:latest
Set the following environment variables: NEO4J_URL, NEO4J_USERNAME and NEO4J_PASSWORD.
Run $ npm test`
[npm-url]: https://npmjs.org/package/moment
[npm-version-image]: http://img.shields.io/npm/v/moment.svg?style=flat
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE