convex@latest with vite / convex auth starter kit streamlining
Hey some suggestion for the npm create convex@latest with vite / convex auth starter kit. First of all, looking great, was up with a discord login chat app in a couple minutes and it translates well from next-auth setup.
However, I stumbled a bit for the vite SITE_URL and JWT env var setup and had to go back and forth between a couple doc pages.
Can we add the generateKeys.mjs script to the starter code in case I picked convex-auth in CLI and maybe even make that script execute the convex env set calls?
5 Replies
Did you run
npx convex-auth@latest
? It does some of the steps in the docs for you
I assume you mean
npx @convex-dev/auth
?ok, can confirm
npx @convex-dev/auth
does the trick with the env vars. I think the confusion for me happened on this page of the doc as in the image. https://labs.convex.dev/auth/setup
So new suggestion: Make two separate doc pages 1. setup from scratch (and include npm create convex@latest -> npx convex dev -> npx @convex-dev/auth flow) 2. install into an existing projectSet Up Convex Auth - Convex Auth
Authentication library for your Convex backend
thanks for the feedback! we know world class docs make a big difference, so we'll keep improving here!
happy to help you improve! will likely dedicate the rest of the year to building on convex, so I'll keep sharing when I stumble 😉