DynamoDB Token Store for Passwordless
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
.npmignore
.travis.yml
dynamostore.coffee
license.md
package.json
readme.md

readme.md

Passwordless-DynamoStore

NPM Build Status Coverage Status Dependency Status devDependency Status

This module provides token storage for Passwordless, a module for Express that allows website authentication without passwords, using verification through email or other means. Visit the Passwordless project's website for more details.

Storage for this module is provided by Amazon Web Services' DynamoDB. You will need an AWS account in order to use this module.

Install

$ npm install passwordless-dynamostore

Use

Just like any other token store:

var passwordless = require('passwordless');
var DynamoStore = require('passwordless-dynamostore');

passwordless.init(new DynamoStore({dynamoOptions: {region: 'eu-west-1'}}));

This code assumes you have the AWS credentials aws_access_key_id and aws_secret_access_key defined in your environment.

An options object may be passed to the class constructor. There are three relevant properties:

Property Explanation
dynamoOptions passed to DynamoDB constructor
tableParams passed to DynamoDB createTable method
stronglyConsistentAuth will the authenticate method use strong consistency? [default: false, i.e. eventual consistency]

Test

$ cd node_modules/passwordless-dynamostore/
$ npm install
$ npm test

passwordless-dynamostore is distributed under the MIT license.