# @universal-packages/token-registry-redis

> Redis engine for universal-token-registry

Latest version **1.4.2** (published 2024-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @universal-packages/token-registry-redis
pnpm add @universal-packages/token-registry-redis
yarn add @universal-packages/token-registry-redis
bun add @universal-packages/token-registry-redis
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.2 |
| Published | 2024-11-30 |
| First published | 2022-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David De Anda |
| Maintainers | omarandstuff |

## Links

- npm: https://www.npmjs.com/package/@universal-packages/token-registry-redis
- Repository: https://github.com/universal-packages/universal-token-registry-redis
- Homepage: https://github.com/universal-packages/universal-token-registry-redis#readme
- Issues: https://github.com/universal-packages/universal-token-registry-redis/issues
- npm.io page: https://npm.io/package/@universal-packages/token-registry-redis

## Recent versions

- 1.4.2 (latest) — 2024-11-30
- 1.4.1 — 2024-11-30
- 1.4.0 — 2024-11-30
- 1.3.11 — 2024-08-25
- 1.3.10 — 2024-08-25
- 1.3.9 — 2024-08-25
- 1.3.8 — 2024-03-23
- 1.3.7 — 2024-03-23
- 1.3.6 — 2024-03-22
- 1.3.5 — 2024-01-01
- 1.3.4 — 2024-01-01
- 1.3.3 — 2023-10-31
- 1.3.2 — 2023-10-30
- 1.3.1 — 2023-10-30
- 1.3.0 — 2023-09-27
- … 9 more at https://npm.io/package/@universal-packages/token-registry-redis/versions

## README

# Token Registry Redis

[![npm version](https://badge.fury.io/js/@universal-packages%2Ftoken-registry-redis.svg)](https://www.npmjs.com/package/@universal-packages/token-registry-redis)
[![Testing](https://github.com/universal-packages/universal-token-registry-redis/actions/workflows/testing.yml/badge.svg)](https://github.com/universal-packages/universal-token-registry-redis/actions/workflows/testing.yml)
[![codecov](https://codecov.io/gh/universal-packages/universal-token-registry-redis/branch/main/graph/badge.svg?token=CXPJSN8IGL)](https://codecov.io/gh/universal-packages/universal-token-registry-redis)

Redis engine for [universal-token-registry](https://github.com/universal-packages/universal-token-registry).

## Install

```shell
npm install @universal-packages/token-registry-redis

npm install @universal-packages/token-registry
npm install redis
```

## RedisEngine

Just pass this engine to the registry to enable it to use ready as the storage engine.

```js
import { Registry } from '@universal-packages/universal-token-registry'
import { RedisEngine } from '@universal-packages/universal-token-registry-redis'

const registry = new Registry({ engine: 'redis', engineOptions: { host: 'localhost' } })

await registry.prepare()
```

### Options

`RedisEngine` takes the same [options](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md) as the redis client.

Additionally takes the following ones:

- **`client`** `RedisClient`
  If you already have a client working in your app you can pass the instance here to not connect another client inside the instance.
- **`globalClient`** `String`
  If the redis client lives in a global variable, name it here.
- **`identifier`** `String`
  String to prepend for identifying the registry related keys.
- **`expireAfter`** `number`
  Time in seconds to expire the tokens after, default is never expire.

## Typescript

This library is developed in TypeScript and shipped fully typed.

## Contributing

The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.

- [Code of Conduct](./CODE_OF_CONDUCT.md)
- [Contributing Guide](./CONTRIBUTING.md)

### License

[MIT licensed](./LICENSE).

---
_Source: https://npm.io/package/@universal-packages/token-registry-redis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
