Newline Proliferating Maniac
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

oauth2-server-redis

1.0.2 • Public • Published

oauth2-server-redis

Build Status Greenkeeper badge

Redis storage backend for oauth2-server

Features

  • Stores the following in Redis:
    • Access tokens
    • Refresh tokens
    • Authorization codes
  • Uses HMSET to store all data as keys (the token or code is the hash)
  • Respects TTL settings so that entries expire at the right time

Requirements

Installation

$ npm install --save @compwright/oauth2-server oauth2-server-redis redis

Usage

const OAuth2Server = require('@compwright/oauth2-server');
const redisStore = require('oauth2-server-redis');
const redis = require('redis');
 
const oauth = new OAuth2Server({
    model: {
        ...redisStore({
            redis: redis.createClient()
        })
    }
});

License

MIT license

install

npm i oauth2-server-redis

Downloadsweekly downloads

17

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability