Skip to content

feat: trust Clerk Development instance tokens alongside production - #57

Merged
chintondutta merged 1 commit into
mainfrom
feat/support-dev-clerk-instance-in-convex
Aug 11, 2026
Merged

feat: trust Clerk Development instance tokens alongside production#57
chintondutta merged 1 commit into
mainfrom
feat/support-dev-clerk-instance-in-convex

Conversation

@chintondutta

Copy link
Copy Markdown
Contributor

Why

Preview deployments use Clerk Development instance keys, but Preview and Production currently share one Convex backend (no isolated per-PR backend - the automated Vercel→Convex deploy pipeline turned out to be unreliable inside Vercel's build container). That one backend only trusted production's Clerk issuer, so every Preview sign-in succeeded on Clerk's side but then failed the Convex handoff with "no auth provider found matching the given token."

Fix

`auth.config.ts`'s `providers` array natively supports multiple trusted issuers. Added the Development instance (`https://allowing-bulldog-0.clerk.accounts.dev\`) as a second entry alongside production, rather than forcing Preview back onto production Clerk keys (which would reopen the untested question of whether Clerk's production instance accepts arbitrary Vercel preview URLs as valid origins).

Deploy note

Per the current workflow (see companion CONTRIBUTING.md update), this needs a manual `npx convex deploy` after merging - Vercel's build no longer touches the Convex backend.

Preview deployments now use Clerk Development instance keys (separate
Frontend API domain from production), but Preview and Production
currently share one Convex backend - there's no isolated per-PR
backend, since the automated Vercel->Convex deploy pipeline turned out
to be unreliable in Vercel's build container (see CONTRIBUTING.md).

That one shared backend can only trust whatever issuer domains are
listed in auth.config.ts's providers array. Until now that was just
production's, so Development-instance tokens (used on every Preview
build) were rejected with "no auth provider found matching the given
token" even after a fully successful Clerk sign-in.

Convex's auth.config.ts natively supports multiple trusted providers,
so this adds the Development instance as a second entry rather than
forcing Preview back onto production Clerk keys (which would reopen
the untested question of whether Clerk's production instance accepts
arbitrary preview URLs as valid origins).
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solvia-web Building Building Preview Aug 11, 2026 8:36pm
solvia-widget Ready Ready Preview Aug 11, 2026 8:36pm

@chintondutta
chintondutta merged commit 3af7d83 into main Aug 11, 2026
3 of 4 checks passed
@chintondutta
chintondutta deleted the feat/support-dev-clerk-instance-in-convex branch August 11, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant