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.
$ npm install passwordless-dynamostore
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] |
$ cd node_modules/passwordless-dynamostore/
$ npm install
$ npm test
passwordless-dynamostore is distributed under the MIT license.