Fastify Session Redis Store is a Redis-backed session store for @fastify/session, providing persistent session storage for Fastify applications. Current stable version is 7.1.2, released under a regular cadence with minor patches. It requires Node.js 16+ and @fastify/session version 10 or above. Key differentiators include full TypeScript support, ioredis compatibility, and simple integration with Fastify's session plugin. Unlike generic session stores, it is purpose-built for Fastify and @fastify/session, ensuring minimal configuration and optimal performance.
npm install fastify-session-redis-storeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to integrate Redis session store into a Fastify app with @fastify/redis and @fastify/session, including registration and a sample route using sessions.
Use import syntax or migrate to ESM. For Node.js, set 'type': 'module' in package.json or use .mjs extension.
Use app.redis after registering @fastify/redis. Do not create a new ioredis client manually.
Upgrade Node.js to version 16 or higher.
Use 'cookie.maxAge' or session configuration in @fastify/session instead of store options.
Ensure @fastify/session is version 10 or later.
Switch to dynamic import: const RedisStore = (await import('fastify-session-redis-store')).default;Register @fastify/redis and use app.redis as the client.
Run: npm install @fastify/session
Ensure the code runs in Node.js (not browser). For browser bundlers, provide environment variables via DefinePlugin or equivalent.