Next.js force-dynamic for auth cookies?

I just started receiving a build error from Next.js where I'm using Supabase Auth:

"Route /settings/organization/teams couldn't be rendered statically because it used cookies."

From what I've read, the SSR package uses cookies, and I migrated to that over two months ago and didn't start receiving the error until the past week. I did update Next.js because of the react flight vuln, but that's the only thing that's changed that I can think of.

Has anybody else come across this error when using supabase auth? Is there a clean solution that I might be missing, or due I need to use the dynamic "force-dynamic" export in every file that also has auth? https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config
Learn about how to configure options for Next.js route segments.
Was this page helpful?