Production

Production

Once you have tested that your auth implementation works well with your dev deployment, you can move onto deploying your app to prod.

Deploy your app to production

Follow the typical steps for deploying a Convex app to prod (opens in a new tab).

Configure your environment variables

Now that you have a production deployment, you can configure environment variables on it.

For the minimal set of required variables, you can use the initialization command with the --prod flag:

npx @convex-dev/auth --prod

Assuming you run this from your project directory and your prod deployment is in the same project as your dev deployment. If this doesn't work, follow the first two steps from Manual Setup.

Configure your provider environment variables

Next you must configure the environment variables for each authentication method.

See specific guidance for OAuth.