@goodrequest/refresh-token-repository-redis
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Build and run tests Publish package to GitHub Packages

Refresh Token Repository using ioredis

This is implementation of refresh token repository interface specified in passport-jwt-wrapper library. It uses Redis as storage and ioredis library for accessing Redis.

Installation

npm i --save @goodrequest/refresh-token-repository-redis

Usage

import { RefreshTokenRepository } from '@goodrequest/refresh-token-repository-redis'
import { redisClient } from './services/redisService'

initAuth(passport, {
	userRepository: new UserRepository(models.User),
	refreshTokenRepository: new RefreshTokenRepository(redisClient)
})

It is recommended to set checkAccessToken configuration variable of passport-jwt-wrapper to true. Redis is fast enough, so this should not have impact on server performance.

Readme

Keywords

none

Package Sidebar

Install

npm i @goodrequest/refresh-token-repository-redis

Weekly Downloads

4

Version

0.1.1

License

ISC

Unpacked Size

55.7 kB

Total Files

28

Last publish

Collaborators

  • logingoodrequest
  • lubomirigonda