Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support maxAgeInMs and fully compatible with express-session on cookie.maxAge #386

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaxMEllon
Copy link

@MaxMEllon MaxMEllon commented May 23, 2024

refs: #369

About

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: ca98am79/connect-dynamodb#87 (comment)

Copy link

changeset-bot bot commented May 23, 2024

⚠️ No Changeset found

Latest commit: b420b91

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.19%. Comparing base (5615e7d) to head (b420b91).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #386      +/-   ##
==========================================
+ Coverage   99.17%   99.19%   +0.01%     
==========================================
  Files           6        6              
  Lines         121      124       +3     
  Branches       37       38       +1     
==========================================
+ Hits          120      123       +3     
  Misses          1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Keeps the internal session.cookie.maxAge in milliseconds so that expire is handled correctly by the express-session store adapter.
@MaxMEllon MaxMEllon force-pushed the feat/cookie-max-age-compatible-express-session-store branch from be21959 to b420b91 Compare May 23, 2024 06:21
@MaxMEllon MaxMEllon changed the title feat: support maxAgeInMs refs #369 feat: support maxAgeInMs and fully compatible with express-session on cookie.maxAge refs #369 May 23, 2024
@MaxMEllon MaxMEllon changed the title feat: support maxAgeInMs and fully compatible with express-session on cookie.maxAge refs #369 feat: support maxAgeInMs and fully compatible with express-session on cookie.maxAge May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant