How do we switch between prod and dev auth? Do I just add two providers?
Using clerk I'm trying to wrap my head around switching between production and dev auth. I can't seem to find anything in the docs.
4 Replies
Hey @Chad Maycumber , our current suggestion is to not run both dev and prod Clerk auth at the same time. Use Clerk dev mode while you're developing initially, and then switch to Clerk prod mode when you're ready for it, both for Convex prod and dev deployments. There should be little harm in using Clerk prod mode while developing.
We are working on a new configuration setup that will enable using different auth provider URLs between Convex prod and dev.
Let me know if you have more questions or feedback, thanks!
Cool that’s helpful context thanks
I’m actually not sure it’s possible to develop using prod Clerk on local host bc of how they manage there cookies
Maybe I could create a proxy? I switched a logic of logic to convex and only ran into this when trying to deploy 🤦♂️
@Chad Maycumber can you try adding both dev and prod Clerk credentials via
npx convex auth
? You should end up with an array in your convex.json
that will include both. Then your client code will determine which one is used via the publishableKey, and your dev and prod deployments will accept either.Yeah that’s what I currently have!
I haven’t had the chance to test it thoroughly yet! I’ll lyk if it works