next-session
next-session copied to clipboard
feat: support `maxAgeInMs` and fully compatible with express-session on cookie.maxAge
refs: #369
About
- Add
maxAgeInMs
option, refs: #369 - Keeps the internal
session.cookie.maxAge
in milliseconds so that expire is handled correctly by the express-session store adapter. -
maxAge
can be used as before. However, when passing it to the store,maxAge
is converted to milliseconds.
Context
connect-dynamodb
computes expires by inheriting cookie.maxAge
. source
And express-session expects cookie.maxAge
to be milliseconds.
next-session
is specified in seconds, which causes problems when connect-dynamodb
and next-session
are used in combination.
This is because next-session
is not fully compatible with express-session
.
refs: https://github.com/ca98am79/connect-dynamodb/pull/87#issuecomment-2121599981