POST /api/auth 404 for next js app using convex + convex auth in monorepo
Hi there,
I have an existing Next.js app, but I realized that I might want to build a desktop app or a mobile app for what I'm building in the future. So I'm currently trying to migrate my Next.js app with Convex to be a mono-repo with Next.js and then Convex in the packages section of the Turbo Repo. I set everything up as I did before, in accordance to the Convex auth docs, but for some reason I get a log that says "api/auth/404" and I don't understand why.
This is the stack trace I get in the browser console:
client.tsx:26
POST http://localhost:3000/api/auth 404 (Not Found)
ConvexAuthNextjsClientProvider.useCallback[call] @ client.tsx:26
AuthProvider.useCallback[signIn] @ client.tsx:236
await in AuthProvider.useCallback[signIn]
handleGoogleSignIn @ page.tsx:26
<button>
Button @ button.tsx:51
<Button>
SignInForm @ page.tsx:83
<SignInForm>
SignIn @ page.tsx:252
I've gone through the docs multiple times, I can't really seem to find any issue either with environment variables or the way I have been set up. So I was wondering why this might be the case.
3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
hey was there any resolution here? i'm facing the same issue
same, but i have the issue with betterauth ):