kebinnnnn
kebinnnnn4mo ago

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
M Zeeshan
M Zeeshan4mo ago
@kebinnnnn you need to set env variable in convex dashboard
Heath
Heath4mo ago
Did you run the initialization command? You can run the initialization with --prod to configure it for prod: https://labs.convex.dev/auth/production
Production - Convex Auth
Authentication library for your Convex backend
kebinnnnn
kebinnnnnOP4mo ago
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
sshader
sshader4mo ago
I'll try and make that production page in the auth docs harder to miss!

Did you find this page helpful?