You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've gotten myself confused about how to properly manage sessions with redis and koa:
There are two projects, koa-session and koa-generic-session. They are both recently updated and neither mentions the other.
The README for koa-session does not recommend any external session stores, the README for koa-generic-session mentions koa-redis.
When attempting to use @types/koa-generic-session, @types/koa-session, and @types/koa-redis it appears that koa-redis IS compatible with koa-session, but IS NOT compatible with koa-generic-session.
The README for koa-session specifies that a store should have get(key, maxAge, { rolling, ctx }), but koa-redis has get(key) (no second or third parameters).
The README for koa-session specifies that a store should have set(key, sess, maxAge, { rolling, changed, ctx }), koa-redis has set(sid, sess, ttl) (no fourth parameter).
The README for koa-session specifies that a store should have destroy(key, {ctx}). koa-redis has destroy(sid) (no second parameter).
Upon initial trial, it appears (on the surface) that koa-session works with koa-redis, though I fear this may be a coincidence.
Are the typings incorrect? Is koa-redis only meant to be used with koa-generic-session? Or can koa-redis be used with koa-session? What is the recommended method for managing sessions with koa and redis?
The text was updated successfully, but these errors were encountered:
I've gotten myself confused about how to properly manage sessions with redis and koa:
koa-session
andkoa-generic-session
. They are both recently updated and neither mentions the other.koa-session
does not recommend any external session stores, the README forkoa-generic-session
mentionskoa-redis
.@types/koa-generic-session
,@types/koa-session
, and@types/koa-redis
it appears thatkoa-redis
IS compatible withkoa-session
, but IS NOT compatible withkoa-generic-session
.koa-session
specifies that a store should haveget(key, maxAge, { rolling, ctx })
, butkoa-redis
hasget(key)
(no second or third parameters).koa-session
specifies that a store should haveset(key, sess, maxAge, { rolling, changed, ctx })
,koa-redis
hasset(sid, sess, ttl)
(no fourth parameter).koa-session
specifies that a store should havedestroy(key, {ctx})
.koa-redis
hasdestroy(sid)
(no second parameter).koa-session
works withkoa-redis
, though I fear this may be a coincidence.Are the typings incorrect? Is
koa-redis
only meant to be used withkoa-generic-session
? Or cankoa-redis
be used withkoa-session
? What is the recommended method for managing sessions with koa and redis?The text was updated successfully, but these errors were encountered: