Open mez opened 1 month ago
wow :( ETA on this? one of my project was giving me issues and i upgraded node, npm and next 14->15 and now none of my projects work. I really do not want to go back to the previous versions and ALL of my apps use convex + convex auth
Here's a Next.js 15 demo using a branch of this library (published as @convex-dev/auth@0.0.75-alpha.1) and a new convex alpha (convex@1.17.1-alpha.1): https://github.com/get-convex/convex-auth-test-next15
These are experimental builds, if you try them please let us know how they are!
Before merging https://github.com/get-convex/convex-auth/pull/118 I'd like to get some feedback.
@thomasballinger Just tried it out, here is some feedback. (Note I am also using @auth/core": "^0.37.4)
So this installs fine while also having @auth/core: "@convex-dev/auth": "0.0.75-alpha.1"
But updating "convex": "^1.17.0" to "convex": "1.17.1-alpha.1" does not work in same context with @auth/core. I guess that's because @convex-dev/auth@0.0.75-alpha.1 depends on @auth/core@"^0.36.0" ? Anyway, so I downgraded auth/core to "^0.36.0" and install was fine and then updated core to 0.37, everything fine here.
Now I tested login to Google/Github and the error messages as OP described was gone - however, routing didn't work. I have a dynamic route to app/user/[[...userId]] after login but I was never redirected. So I thought my middleware was bugging and just copy-pasted yours from the example but it still didn't work. So now I just renamed it to _middleware.ts and login and routing worked just fine! Adding back middleware.ts, routing stopped working.
@JohnKesko thank you! Great this is really helpful for scoping this work, appreciate the investigation.
@JohnKesko could you share your middleware.ts file? With simple middleware I can't reproduce this.
@thomasballinger
Nevermind. All works just fine now even with middleware.ts as in your example.
The reason was I didn't have my root layout wrapped in <ConvexAuthNextjsServerProvider>
, totally missed that 🤦
Great to hear! Sounds like we're closer to releasing this, still want to let it bake a bit.
Just tried to update to Next15, the Async Request APIs breaking changes did break
convexAuth
specifically cookie and token requesting area.To reproduce, just update to Next 15 while using convexAuth.