Redis backend for consulate-authcode-simple-secrets
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
README.md
index.js
package.json

README.md

consulate-authcode-simple-secrets-redis Build Status

Redis backend for consulate-authcode-simple-secrets

Usage

var consulate = require('consulate')
  , authcode = require('consulate-authcode-simple-secrets')
  , authcodeRedis = require('consulate-authcode-simple-secrets-redis');

var app = consulate();

app.plugin(authcode({
  key: process.env.AUTHCODE_SECRET
}, authcodeRedis({
  url: process.env.MY_REDIS_URL, // defaults to `process.env.MY_REDIS_URL` or 'redis://localhost:6379'
  prefix: 'my-authcode-prefix', // defaults to 'authcode'
  ttl: 60 // time-to-live of the auth code in seconds - defaults to 10 minutes
})));

Tests

$ npm test