mc@edgevanta
mc@edgevanta15mo ago

Environment variable AUTH0_DOMAIN is used in auth.config.js but its value was not set: Vercel

I am scratching my head here attempting to deploy using Vercel and Next.js my auth.config.js file looks like this
export default {
providers: [
{
domain: process.env.AUTH0_DOMAIN,
applicationID: process.env.AUTH0_CLIENT_ID,
},
],
};
export default {
providers: [
{
domain: process.env.AUTH0_DOMAIN,
applicationID: process.env.AUTH0_CLIENT_ID,
},
],
};
and i have the following configuration in the Vercel projects environment variables:
No description
4 Replies
mc@edgevanta
mc@edgevantaOP15mo ago
and this is the error log from vercel
No description
ian
ian15mo ago
Ah, the process.env used in auth.config.js pulls env variables from the Convex environment variables (npx convex dashboard) It's so you can have separate prod & dev configurations authenticated by Convex, vs. the vercel variables which determine what your client knows about.
jamwt
jamwt15mo ago
@mc@edgevanta try setting these in the convex environment variables for your prod deployment and let us know if that clears things up
mc@edgevanta
mc@edgevantaOP15mo ago
worked like a charm!! i was working with the new convex preview environments and added the needed environment variables in the default environment variables section of the project settings. and now im able to log into a separate auth0 tenant. thank you !

Did you find this page helpful?