consulate-authcode-simple-secrets-redis

Redis backend for consulate-authcode-simple-secrets

consulate-authcode-simple-secrets-redis

Redis backend for consulate-authcode-simple-secrets

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 
})));
$ npm test