{"id":45106,"library":"hono-sessions-redis","title":"hono-sessions-redis","description":"Redis session store connector for hono-sessions, forked from connect-redis-hono. Version 1.1.1, actively maintained. It provides a RedisStoreAdapter class that integrates with hono-sessions middleware to store session data in Redis. Only compatible with ioredis client. Different from alternatives like connect-redis-hono by being tailored for Hono framework and hono-sessions package.","status":"active","version":"1.1.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install hono-sessions-redis","lang":"bash","label":"npm"},{"cmd":"yarn add hono-sessions-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add hono-sessions-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to create Redis client instance used in RedisStoreAdapter","package":"ioredis","optional":false},{"reason":"Peer dependency for session middleware integration","package":"hono-sessions","optional":false}],"imports":[{"note":"ESM-only package; named export.","wrong":"const RedisStoreAdapter = require('hono-sessions-redis')","symbol":"RedisStoreAdapter","correct":"import { RedisStoreAdapter } from 'hono-sessions-redis'"},{"note":"No default export; only named export available.","wrong":"import RedisStoreAdapter from 'hono-sessions-redis'","symbol":"default","correct":"import { RedisStoreAdapter } from 'hono-sessions-redis'"},{"note":"Wrong symbol name; export is exactly RedisStoreAdapter.","wrong":"import Redis from 'hono-sessions-redis'","symbol":"RedisStoreAdapter","correct":"import { RedisStoreAdapter } from 'hono-sessions-redis'"}],"quickstart":{"code":"import { Hono } from 'hono';\nimport { sessionMiddleware } from 'hono-sessions';\nimport { RedisStoreAdapter } from 'hono-sessions-redis';\nimport Redis from 'ioredis';\n\nconst redisClient = new Redis({ host: 'localhost', port: 6379 });\nconst store = new RedisStoreAdapter({\n  prefix: 'Session:',\n  ttl: 3600,\n  client: redisClient,\n});\n\nconst app = new Hono();\napp.use('*', sessionMiddleware({ store }));\napp.get('/', (c) => c.text('Hello'));\n\nexport default { port: 3000, fetch: app.fetch };","lang":"typescript","description":"Basic setup of Hono app with session middleware using RedisStoreAdapter and ioredis client."},"warnings":[{"fix":"Use ioredis instead of node-redis or other clients.","message":"Only compatible with ioredis; redis v4+ not supported","severity":"breaking","affected_versions":"<=1.1.1"},{"fix":"Use keyPrefix in session middleware if needed.","message":"Prefix option may be removed in future versions","severity":"deprecated","affected_versions":"1.x"},{"fix":"Ensure ttl value is in seconds.","message":"TTL is in seconds, not milliseconds","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wait for Redis client 'ready' event before using store.","message":"Redis client must be fully connected before creating store","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Refer to hono-sessions-redis documentation, not connect-redis-hono.","message":"Fork from connect-redis-hono; API differences may exist","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.1':20 'activ':21 'altern':48 'class':27 'client':45 'compat':42 'connect':16,51 'connect-redis-hono':15,50 'connector':8 'data':38 'differ':46 'fork':13 'framework':59 'hono':2,11,18,32,53,58,62 'hono-sess':10,31,61 'hono-sessions-redi':1 'integr':29 'ioredi':44 'javascript':65 'like':49 'maintain':22 'middlewar':34 'packag':64 'provid':24 'redi':4,5,17,40,52 'redisstoreadapt':26 'session':3,6,12,33,37,63 'store':7,36 'tailor':56 'version':19","created_at":"2026-06-07T12:53:24.034613+00:00","updated_at":"2026-06-07T12:53:24.034613+00:00","problems":[{"fix":"Use `import { RedisStoreAdapter } from 'hono-sessions-redis'`","cause":"Importing default export instead of named export","error":"TypeError: RedisStoreAdapter is not a constructor"},{"fix":"Use `import Redis from 'ioredis'` and instantiate correctly.","cause":"Passing client that is not from ioredis","error":"ERR_INVALID_ARG_TYPE: The \"client\" argument must be an instance of Redis"},{"fix":"Provide a prefix string (e.g., prefix: 'Session:')","cause":"Omitting prefix option in RedisStoreAdapter constructor","error":"Error: Prefix is not allowed to be empty"},{"fix":"Use named import `{ RedisStoreAdapter }`","cause":"Attempting default import","error":"Module \"hono-sessions-redis\" has no default export"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"hono-sessions-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}