Skip to content

fix: cookie maxAge should be in seconds#765

Closed
hmnd wants to merge 1 commit into
supabase:mainfrom
hmnd:patch-1
Closed

fix: cookie maxAge should be in seconds#765
hmnd wants to merge 1 commit into
supabase:mainfrom
hmnd:patch-1

Conversation

@hmnd

@hmnd hmnd commented Apr 9, 2024

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Cookie maxAge is currently being set to 1000 years, since maxAge is specified in seconds, not milliseconds.

What is the new behavior?

Cookie maxAge is 365 days (1 year), below the maxAge limit of 400 days (https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis-13#section-4.1.2.2)

@hmnd hmnd requested a review from a team as a code owner April 9, 2024 18:24
@kangmingtay

Copy link
Copy Markdown
Member

hi @hmnd, this is a non-issue as mentioned in this comment, will be closing the PR but please reopen it if you think that there's still a need for this

@hmnd

hmnd commented Apr 10, 2024

Copy link
Copy Markdown
Author

@kangmingtay the reason I brought it up is that it causes my Hono app to break. Hono adheres to RFC 6265 and throws when a cookie with a max age > 400 days is set.

Would setting to 400 days be a good compromise?

@hmnd

hmnd commented Apr 11, 2024

Copy link
Copy Markdown
Author

@kangmingtay I don't think I'm able to reopen, but I think this is still an issue for the reason above :)

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.

2 participants