Repository navigation
Closed
Labels
ready-for-humanRequires human implementation
Description
Part of the launch (#416). HITL: Allison does this in the Clerk dashboard, Google Cloud and Vercel DNS.
Start it early. Clerk says DNS can take up to 48 hours to propagate, and #416 can't deploy without the live keys.
Why
The development instance borrows Clerk's domain and Google app, so it works with no setup. Production has to use ours. Sign-in cookies must belong to our domain, or browsers treat them as third-party and block them. Invitation and waitlist emails must come from patchyhq.com, or they land in spam.
Steps
- Pick the app hostname, for example
cloud.patchyhq.com. It becomesPATCHY_PUBLIC_BASE_URLandCLERK_AUTHORIZED_PARTIES. The server only checks the authorized party when that setting is present (packages/auth/src/Session.ts), so set it. - Create the production instance of the
patchy-cloudClerk application on that domain. - Add the DNS records Clerk lists to
patchyhq.comin Vercel DNS. Explicit records override the wildcard*ALIAS. Leavepost, which is PatchPage, alone. - Google sign-in: create a Google OAuth client named Patchy and paste its ID and secret into Clerk. Clerk's shared credentials are development-only. To offer email sign-in only, turn Google off and skip this.
- Session token claims: match the development instance. Patchy refuses a session whose token lacks
email, andnamemust be present even if null (packages/auth/src/Session.ts,SessionClaims). - Brand the emails Clerk sends: invitations, and the waitlist emails from chore(auth): private beta sign-up through Clerk's waitlist #481. Add the agent line from feat(server): the agent front door: /llms.txt, an installer and patchy setup #36 to the invitation and waitlist-approval emails: Tell your agent: Set up Patchy using https:///llms.txt.
- Store the keys: put
pk_live_…,sk_live_…and the authorized party where feat(infra): production infrastructure in AWS CDK and the deploy workflow #415's secrets expect them. Record on this issue where they live, never the keys themselves.
Done when
Clerk's Domains page shows every record verified, and the live keys are where #415's deploy reads them.
Metadata
Metadata
Assignees
Labels
ready-for-humanRequires human implementation
Activity
allisonmahmood commentedon Oct 2, 2026
Production instance created 2026-10-02.
ins_3K9DquBVFdEZKMk6ewpjpCRD0Zmon thepatchy-cloudClerk app (app_3ImZuFeZJb8038U0oFds84rupA2), cloned from development.patchyhq.comas the primary domain. Frontend APIclerk.patchyhq.com, Account Portalaccounts.patchyhq.com, mail frompatchyhq.com. Home URLhttps://cloud.patchyhq.com, so sign-ups that don't carry a redirect land in the app.https://cloud.patchyhq.com, which isPATCHY_PUBLIC_BASE_URLandCLERK_AUTHORIZED_PARTIES.clerk,accounts,clkmail,clk._domainkeyandclk2._domainkey. Clerk verified DNS and mail;clerk.patchyhq.comhas its certificate.cloud.patchyhq.comandaccounts.patchyhq.com.post.patchyhq.comserves PatchPage pages that users publish, so other subdomains must not reach Clerk's Frontend API.emailandnamecloned and checked. Apple and Microsoft are off because they have no production credentials. Google is on and waiting for its credentials.~/.config/patchy-cloud/prod.envon Allison's machine (mode 600), together with the public URL and authorized party. feat(infra): production infrastructure in AWS CDK and the deploy workflow #415 has no Secrets Manager yet, so chore(infra): the first deploy of Patchy to AWS #416 moves them there. Re-pull withclerk env pull --app app_3ImZuFeZJb8038U0oFds84rupA2 --instance prod --file <file>.Left:
https://clerk.patchyhq.com/v1/oauth_callback, publishing status In production, ID and secret into Clerk's custom credentials.accounts.patchyhq.comcertificate, which Clerk issues on its own.Email branding is deferred. Custom email templates need Clerk Pro, and we're staying on the free plan for now, so invitations use Clerk's default copy and the agent line lives on Patchy's own pages.
allisonmahmood commentedon Oct 2, 2026
Done. Since the comment above:
cloud.patchyhq.comis issued, and CAA now allowsamazon.com(details on feat(infra): production infrastructure in AWS CDK and the deploy workflow #415).The live keys are in
~/.config/patchy-cloud/prod.envuntil #416 places them in Secrets Manager.docs(ops): the Clerk settings Patchy needs, so a new instance can sig…