Auth Provider Discovery Failed
Has anyone recieved this error while self-hosting? I am using coolify to host convex and my front-end is a next.js app. Everything has been working with my app before when I was using convex cloud but I wanted to try self hosting instead and now I keep getting this error when trying to register/login/check if a user is authenticated. I obscured the url for security reasons. Any ideas would be great!
Returning false from isAuthenticated because Error: {"code":"AuthProviderDiscoveryFailed","message":"Auth provider discovery of https://%2A%2A%2A%2A%2A/http failed: 404 Not Found
14 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!
Have you tried the auth debug steps? https://docs.convex.dev/auth/debug
Debugging Authentication | Convex Developer Hub
You have followed one of our authentication guides but something is not working.
Yea nothing seems to work
When I try to register an account or log in I do get these in the chrome console

Auth should be completely working as it was 100% working when I was using convex cloud idk if I am just missing something or a step with convex auth and self hosting but I followed the guide exactly
This is my middleware.ts file for next.js
And this shows up in my next.js npm run dev terminal after attempting to register/login

Can you share the rest of the error in that last screenshot
The beginning part has the actual error message
It was too long had to upload as a txt file hope that is fine
This maybe be helpful too so I will post it. On ly convex dashboard settings for URL & Deploy keys I have these so I created the CONVEX_SITE_URL environment variable matching that url and it seems that from that error message it is trying to hit that http actions url

And here is the authentication settins on my convex dashboard, this url matches the CONVEX_SITE_URL

I also tried manually opening this url and entering my admin token and it does says 404

What domain is in your auth.config.ts? That's the Convex dashboard 404 html printed out in the error, which makes me think the auth domain is convex.dev or a subdomain of convex.dev.
You can dm if you want to keep it private
Okay thanks! I will send you a dm