ainuRakkA
Convex Community5d ago
2 replies
ainuRakk

Convex Auth with nextjs 16

🔑AuthResolved
Hi! I'm following the Convex's documentation on integrating Convex Auth and am running into an issue. I have Nextjs 16 and Codex tells me there's a compatibility issue with the problem I'm having.
Basically I followed the setup and opted for Google oAuth. I have variables all setup and the pages/functions created as instructed, but the middleware in the root dir is causing this issue:

The "middleware" file convention is deprecated. Please use "proxy" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
✓ Ready in 1096ms
⨯ Error:
headers
was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context
at ignore-listed frames
GET / 404 in 370ms (compile: -38579µs, proxy.ts: 361ms, render: 48ms)

When I move the middleware into the app/ dir the page at least loads, but clicking the sign in button just gives /api/auth 404.
Please let me know if I've made some mistake or it's the version, I also provided a ss of my project's structure.
Screenshot_2026-02-26_at_19.10.15.png
Was this page helpful?