https://github.com/compwright/oauth2-server-redis
Redis storage backend for oauth2-server
https://github.com/compwright/oauth2-server-redis
oauth2-server redis
Last synced: 9 months ago
JSON representation
Redis storage backend for oauth2-server
- Host: GitHub
- URL: https://github.com/compwright/oauth2-server-redis
- Owner: compwright
- License: mit
- Created: 2018-08-06T06:46:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-19T15:26:32.000Z (10 months ago)
- Last Synced: 2025-04-11T03:47:44.488Z (9 months ago)
- Topics: oauth2-server, redis
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/oauth2-server-redis
- Size: 356 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oauth2-server-redis
[](https://app.travis-ci.com/compwright/oauth2-server-redis)
[](https://www.npmjs.com/package/oauth2-server-redis)
[](https://github.com/sponsors/compwright)
Redis storage backend for [oauth2-server](https://github.com/compwright/node-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
* Node.js 10+
* [oauth2-server](https://github.com/compwright/node-oauth2-server)
* [redis](https://www.npmjs.com/package/redis)
## Installation
```bash
$ npm install --save @compwright/oauth2-server oauth2-server-redis redis
```
## Usage
```javascript
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