pavelvlasov / koa-generic-session-mongo

MongoDB store for koa-session middleware backed by node-mongodb-native.
MIT License
37 stars 16 forks source link

session data gets modified before saving #17

Closed lzztt closed 7 years ago

lzztt commented 7 years ago

mongo store added two new fields (sid and ttl) to the session data (in set(sid, sess, ttl))

Issue found by user yuu2lee4:

from: yuu2lee4 and i found a strange thing, i seted session.user, then i console it, the object has no 'sid' and 'ttl' , but after i setted session.pin , it has 'sid' and 'ttl' image

pavelvlasov commented 7 years ago

thanks @longztian! fixed in https://github.com/pavelvlasov/koa-generic-session-mongo/commit/355eaa24ed3eec62aee4d21ec1e92ed3fba2ee5c