You’ve understood the current behavior correctly, and the limitation you’re seeing is real given how AuthKit auto‑configuration works today.
What the docs say about preview AuthKit environments
For previews, Convex explicitly recommends project‑level (shared) AuthKit environments, not one per preview deployment:
Deployment-specific AuthKit environments can be created for any deployment are difficult set up automatically so shared project-level environments are generally a better fit. [Project vs deployment AuthKit]
And the recommended convex.json example shows a single authKit.preview block that uses Vercel build env vars to set redirect URIs / CORS for “preview” in general, not per‑deployment: [Recommended configuration]
"preview": {
"configure": {
"redirectUris": ["<https://${buildEnv.VERCEL_BRANCH_URL}/callback"],>
"appHomepageUrl": "<https://${buildEnv.VERCEL_PROJECT_PRODUCTION_URL}",>
"corsOrigins": ["<https://${buildEnv.VERCEL_BRANCH_URL}"]>
}
}
The auto‑provisioning flow is:
- On each preview deploy, Convex finds the same preview AuthKit environment (project‑level) and configures it using that
configure block. [Automatic AuthKit]
So if two branches deploy in parallel, they are both configuring the same WorkOS preview environment; the last deploy “wins” in terms of redirect URIs / CORS.
The docs do not describe any mechanism to:
- Create a separate WorkOS environment per preview deployment, or
- Keep multiple different redirect URI / CORS configurations in one WorkOS environment simultaneously.