milk enjoyer
milk enjoyer9mo ago

Getting MissingAccessToken when deploying to prod

I am getting Unauthorized: MissingAccessToken: An access token is required for this command. when I am deploying to prod. I have double-checked that the deploy key is correct.
7 Replies
milk enjoyer
milk enjoyerOP9mo ago
I’m deploying on vercel by the way. When using the dev deploy key it works.
milk enjoyer
milk enjoyerOP9mo ago
I also double checked the guide and I don’t see what could be wrong https://docs.convex.dev/production/hosting/vercel
Using Convex with Vercel | Convex Developer Hub
Host your frontend on Vercel and your backend on Convex.
sshader
sshader9mo ago
Can you double check that any environment variables used in auth.config.js / auth.config.ts (if you have one) are defined in your prod convex deployment? We have a bug that will be fixed in our next release where we hit an error like this when trying to give you a dashboard URL to set these env variables
milk enjoyer
milk enjoyerOP9mo ago
Ah yes that was the problem I forgot to set that in prod thanks!
burnstony#1975
burnstony#19758mo ago
I am unclear what to set in prod, this is what is in my auth.config.ts const config = { providers: [ { // Configure CLERK_JWT_ISSUER_DOMAIN on the Convex Dashboard // See https://docs.convex.dev/auth/clerk#configuring-dev-and-prod-instances domain: process.env.CLERK_JWT_ISSUER_DOMAIN, applicationID: "convex", }, ], }; export default config;
Michal Srb
Michal Srb8mo ago
You need to set the environment variable on your production deployment.
burnstony#1975
burnstony#19758mo ago
Thank you

Did you find this page helpful?