Skip to content

Added TTL onto cookie#284

Merged
taoTimTim merged 1 commit intomainfrom
Add-TTL-To-Cookie
Apr 2, 2025
Merged

Added TTL onto cookie#284
taoTimTim merged 1 commit intomainfrom
Add-TTL-To-Cookie

Conversation

@JamesBirni
Copy link
Copy Markdown
Collaborator

30 min TTL on login.

Resolves #171

@JamesBirni JamesBirni self-assigned this Apr 2, 2025
Copy link
Copy Markdown
Owner

@LucasSlunt LucasSlunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxAge is based on milliseconds, but the provided value of 1800 is based on seconds. For a TTL of half an hour, use maxAge: 0.5 * 60 * 60 * 1000.

@JamesBirni
Copy link
Copy Markdown
Collaborator Author

maxAge is based on milliseconds, but the provided value of 1800 is based on seconds. For a TTL of half an hour, use maxAge: 0.5 * 60 * 60 * 1000.

This is wrong. It is in second as per documentation:
image

Copy link
Copy Markdown
Collaborator

@taoTimTim taoTimTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation comment runs true, it is in seconds. This is ready to be merged. Nice catch.

@taoTimTim taoTimTim merged commit fdc5d09 into main Apr 2, 2025
2 checks passed
@JamesBirni JamesBirni deleted the Add-TTL-To-Cookie branch September 28, 2025 21:31
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.

Added TTL to cookie

3 participants