0.1.1 • Published 11 months ago

@goodrequest/refresh-token-repository-redis v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

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.

0.1.0

11 months ago

0.1.1

11 months ago

0.0.1

1 year ago