lzztt / koa-session-minimal

Minimal implementation of session middleware for Koa 2
MIT License
75 stars 13 forks source link

Support ctx.sessionId #8

Closed jwangnz closed 7 years ago

jwangnz commented 7 years ago

as koa-generic-session has this.sessionId

lzztt commented 7 years ago

Hi tsing,

I thought about this, but didn't think that sessionId would be a reliable value for any middleware to use, because of session's regeneration / rolling id feature. Any middleware can regenerate the whole session, or roll the session id at any time, which would invalidate the previously saved sessionId value without notice.