Auth is working in development but getting an error after deploying on Vercel
Getting
Uncaught Error: Missing environment variable JWT_PRIVATE_KEY
Should I be setting up this env variable before it can work on production? Following the convex-auth docs I assumed it would be alright out of the box. Appreciate any advice or help, thanks in advance!
I did try generating a jwt private key and then repeatedly got this error: Uncaught Error: Missing environment variable JWKS
. Wasn't really sure what I was doing at this point.4 Replies
@kebinnnnn
you need to set env variable in convex dashboard
Did you run the initialization command?
You can run the initialization with
--prod
to configure it for prod:
https://labs.convex.dev/auth/productionProduction - Convex Auth
Authentication library for your Convex backend
resolved thank u ! ended up manually adding the jwt and jwks environment variables and it’s good now
oh man i missed this when going through the docs, thanks for pointing this out
I'll try and make that production page in the auth docs harder to miss!