You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It requires setting up a middleware using convexAuthNextjsMiddleware - but whenever I try to use it, I get the following error:
I digged a bit and it seems that the @convex-dev/auth/nextjs/server/index.js (which is server-only file) is importing nextjs/client.js which is client-only and imports React hooks, which most likely is triggering the error.
I wonder how is that supposed to work? Did I miss something? I don't understand why the middleware was bundled together with context provider in a single file.
From my perspective, obvious solution would be to decouple context provider from middleware, but maybe there was a reason for this?
We're currently prioritizing support for the stable versions of Next + React (as opposed to working with release candidates). Until we prioritize support with the newer versions, Convex Auth will work best with the stable versions of react + next.
I want to integrate Convex auth with NextJS. I'm following the following docs:
https://labs.convex.dev/auth/authz/nextjs
It requires setting up a middleware using convexAuthNextjsMiddleware - but whenever I try to use it, I get the following error:
I digged a bit and it seems that the @convex-dev/auth/nextjs/server/index.js (which is server-only file) is importing nextjs/client.js which is client-only and imports React hooks, which most likely is triggering the error.
I wonder how is that supposed to work? Did I miss something? I don't understand why the middleware was bundled together with context provider in a single file.
From my perspective, obvious solution would be to decouple context provider from middleware, but maybe there was a reason for this?
My deps:
The text was updated successfully, but these errors were encountered: