Skip to content

fix: max cookie maxage is 400 days#37

Closed
hmnd wants to merge 1 commit into
supabase:mainfrom
hmnd:fix/cookie-maxage
Closed

fix: max cookie maxage is 400 days#37
hmnd wants to merge 1 commit into
supabase:mainfrom
hmnd:fix/cookie-maxage

Conversation

@hmnd

@hmnd hmnd commented Jul 11, 2024

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Cookies are currently being set to a Max-Age of 1000 years, instead of 365 days. Per this RFC, 400 days is the maximum age that can be set for a cookie.

What is the new behavior?

Cookie Max-Age is set to 400 days.

Additional context

I first brought up this PR on the old auth-helpers repo: supabase/auth-helpers#776

As of Chrome 104, this 400 day limit is enforced and any Max-Age > 400 days will be forced down to 400 days.

This is breaking my usage with Hono (see honojs/hono#2762) and Hono does not seem motivated to change their stance on this RFC from the web server side of things.

@j4w8n

j4w8n commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

I second this. It would be best for the community and ecosystem.

@J0

J0 commented Aug 28, 2024

Copy link
Copy Markdown
Contributor

Thank you for the PR. We are discussing this internally and will get back soon

@hf

hf commented Aug 28, 2024

Copy link
Copy Markdown
Collaborator

Addressed in another PR, sorry didn't see this one was open as it was raised internally.

@hf hf closed this Aug 28, 2024
@j4w8n

j4w8n commented Aug 28, 2024

Copy link
Copy Markdown
Contributor

@hmnd 🔥
#54

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.

4 participants