koa-generic-session

JSON →
library 2.3.1 ·javascript
verified Jun 7, 2026

Generic session middleware for Koa framework (current stable v2.3.1). Provides flexible session management with pluggable external stores (redis, mongo, etc.) and supports synchronous and generator-based session handling. Key differentiator: it only writes cookies when session data changes, supports rolling sessions, and exposes session ID via this.sessionId. Requires Node >=6 and Koa v2, with async/await support. Maintained by the Koa core team.