cyremur
cyremur•4mo ago

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
ian
ian•4mo ago
Did you run npx convex-auth@latest? It does some of the steps in the docs for you
cyremur
cyremurOP•4mo ago
npm ERR! 404 Not Found - GET https://registry.npmjs.org/convex-auth - Not found
npm ERR! 404 Not Found - GET https://registry.npmjs.org/convex-auth - Not found
I assume you mean npx @convex-dev/auth ?
cyremur
cyremurOP•4mo ago
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 project
Set Up Convex Auth - Convex Auth
Authentication library for your Convex backend
No description
jamwt
jamwt•4mo ago
thanks for the feedback! we know world class docs make a big difference, so we'll keep improving here!
cyremur
cyremurOP•4mo ago
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 😉