413 Payload too large with next-auth
Unanswered
Portuguese Podengo posted this in #help-forum
Portuguese PodengoOP
I'm building a developer portal for m company and we're using next-auth to handle the sso to azure AD, our internal tests went fine but one of our older users who must have a lot of roles in the AD has been having the error while trying to login
Request Method:
GET
Status Code:
413 Payload Too Large
Remote Address:
3.163.9.31:443
Referrer Policy:
strict-origin-when-cross-origin
I've tried to find in the docs where to configure the body size limit of a route handler to adjust this but didn't find anything, anyone has any idea of how to solve this issue?
Request Method:
GET
Status Code:
413 Payload Too Large
Remote Address:
3.163.9.31:443
Referrer Policy:
strict-origin-when-cross-origin
I've tried to find in the docs where to configure the body size limit of a route handler to adjust this but didn't find anything, anyone has any idea of how to solve this issue?
1 Reply
Cape lion
Hello! Have you tried add the custom config at the route handler? Following the nextjs docs you can export a config to change default behavior.
Here https://nextjs.org/docs/pages/building-your-application/routing/api-routes#custom-config have some available custom configs.
Here https://nextjs.org/docs/pages/building-your-application/routing/api-routes#custom-config have some available custom configs.