@nauth-toolkit/storage-redis 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +44 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,9 +1,50 @@
1
1
  # @nauth-toolkit/storage-redis
2
2
 
3
- Redis session storage for [nauth-toolkit](https://nauth.dev).
3
+ Redis storage adapter for [nauth-toolkit](https://nauth.dev).
4
4
 
5
- Stores sessions, rate limit counters, and distributed locks in Redis. Compatible with Redis and Dragonfly. Designed for production deployments that need fast session lookups and horizontal scaling.
5
+ Stores rate limit counters, account lockout state, and distributed locks in Redis. Compatible with Redis and Dragonfly. Designed for production deployments that need fast lookups and horizontal scaling.
6
+
7
+ **[Documentation](https://nauth.dev)** · **[GitHub](https://github.com/noorixorg/nauth)**
8
+
9
+ > Part of [nauth-toolkit](https://www.npmjs.com/package/@nauth-toolkit/core). Requires `@nauth-toolkit/core`.
10
+
11
+ ---
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install @nauth-toolkit/storage-redis
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Usage
22
+
23
+ ```typescript
24
+ import { RedisStorageAdapter } from '@nauth-toolkit/storage-redis';
25
+
26
+ const nauth = await NAuth.create({
27
+ config: {
28
+ ...authConfig,
29
+ storageAdapter: new RedisStorageAdapter(process.env.REDIS_URL),
30
+ },
31
+ dataSource,
32
+ adapter: new ExpressAdapter(),
33
+ });
34
+ ```
6
35
 
7
36
  Uses the `redis` (node-redis) package.
8
37
 
9
- **Docs:** [nauth.dev](https://nauth.dev) · **Examples:** [github.com/noorixorg/nauth](https://github.com/noorixorg/nauth) · **Live demo:** [demo.nauth.dev](https://demo.nauth.dev)
38
+ ---
39
+
40
+ ## Also available
41
+
42
+ | Package | Purpose |
43
+ | --- | --- |
44
+ | [`@nauth-toolkit/storage-database`](https://www.npmjs.com/package/@nauth-toolkit/storage-database) | Database-backed storage — no Redis required |
45
+
46
+ See the [full package list](https://www.npmjs.com/package/@nauth-toolkit/core#package-ecosystem) in the core README.
47
+
48
+ ---
49
+
50
+ Free to use. See [license](https://nauth.dev/docs/license).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nauth-toolkit/storage-redis",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Redis session storage for nauth-toolkit — supports Redis and Dragonfly",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "format:check": "prettier --check \"src/**/*.ts\""
15
15
  },
16
16
  "peerDependencies": {
17
- "@nauth-toolkit/core": "^0.2.1",
17
+ "@nauth-toolkit/core": "^0.2.2",
18
18
  "redis": "^4.6.0 || ^5.0.0"
19
19
  },
20
20
  "devDependencies": {