Skip to content

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

@jacobgill1

Description

@jacobgill1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions