Passwordless-Sqlite3Store
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 for more details.
Tokens are stored in a Sqlite3 database and are hashed and salted using bcrypt-nodejs.
Usage
First, install the module:
$ npm install passwordless-sqlite3store --save
Afterwards, follow the guide for Passwordless. A typical implementation may look like this:
var passwordless = require('passwordless');
var PostgreStore = require('passwordless-sqlite3store');
passwordless.init(new Sqlite3Store('testdb.sqlite3'));
passwordless.addDelivery(
function(tokenToSend, uidToSend, recipient, callback) {
});
app.use(passwordless.sessionSupport());
app.use(passwordless.acceptToken());
Initialization
Example:
passwordless.init(new Sqlite3Store('testdb.sqlite3', {
mode: sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE,
table: 'passwordless'
}));
Tests
$ npm test
License
MIT License
Author
Kapil Kaisare (http://kaisare.in) (I just adapted code from Bruno MARQUES (http://marques.io)