Next.js Discord

Discord Forum

Nextjs + NextAuth on AWS WAF rules

Unanswered
Aidi posted this in #help-forum
Open in Discord
AidiOP
Hi, is anyone facing issue with cookie header size and default aws WAF rules???? We have a Nextjs app where we are using NextAuth for user authentication with Auth0 as identity provider. Everything seems to work just wright but when deployed on AWS, the default Web ACL rule for SizeRestrictions_Cookie_HEADER gets triggered and throws 403 error. I can see that NextAuth breaks cookie into multiple but the overall size is larger than what the default rule allows https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-baseline.html. Has anyone else faced this issue?
Any pointers would helpful

2 Replies