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

Next-auth session cookies cause RequestHeaderSectionTooLarge when getting static assets #22

Open
3 tasks done
jacobgill1 opened this issue Mar 13, 2024 · 1 comment · May be fixed by #23
Open
3 tasks done

Next-auth session cookies cause RequestHeaderSectionTooLarge when getting static assets #22

jacobgill1 opened this issue Mar 13, 2024 · 1 comment · May be fixed by #23
Labels
bug Something isn't working triage

Comments

@jacobgill1
Copy link

Is there an existing issue for this?

  • I have searched the existing Issues

Current Behavior

When using next-auth with access tokens and refresh tokens to secure my site, I receive a RequestHeaderSectionTooLarge error when retrieving static assets. This is due to the maximum size being 8192 on S3 buckets (see aws-amplify/amplify-hosting#2558).

Expected Behavior

Amazon S3 doesn't process cookies see docs here.

I think the cookie_behavior option in the cloudfront cache policy should be changed to "none" in the locals.tf

Steps To Reproduce

Use next-auth with a large session cookie

Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Sensitive Information Declaration

  • I confirm that neither PII/PID nor sensitive data are included in this form
@jacobgill1 jacobgill1 added bug Something isn't working triage labels Mar 13, 2024
@jacobgill1 jacobgill1 linked a pull request Mar 13, 2024 that will close this issue
10 tasks
@debu99
Copy link

debu99 commented Jun 7, 2024

will this cause this issue when send to lambda function url?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants