feat: support maxAgeInMs
and fully compatible with express-session on cookie.maxAge
#386
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs: #369
About
maxAgeInMs
option, refs: Session stores expect maxAge to be in milliseconds not seconds #369session.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 inheritingcookie.maxAge
. sourceAnd express-session expects
cookie.maxAge
to be milliseconds.next-session
is specified in seconds, which causes problems whenconnect-dynamodb
andnext-session
are used in combination.This is because
next-session
is not fully compatible withexpress-session
.refs: ca98am79/connect-dynamodb#87 (comment)