Skip to content

fix: default the AuthKit issuer to accounts.mukoko.com, not the dead host - #126

Merged
bryanfawcett merged 1 commit into
mainfrom
claude/workos-issuer-migration-accounts-mukoko
Aug 10, 2026
Merged

fix: default the AuthKit issuer to accounts.mukoko.com, not the dead host#126
bryanfawcett merged 1 commit into
mainfrom
claude/workos-issuer-migration-accounts-mukoko

Conversation

@bryanfawcett

Copy link
Copy Markdown
Contributor

The problem

workosAuthkitDomain() fell back to identity.nyuchi.com when WORKOS_AUTHKIT_DOMAIN is unset. That host was detached by the 10 Aug 2026 issuer migration and now returns Cloudflare error 1014.

A default is not harmless here. Every .well-known discovery route and /auth.md derives its endpoints from this one function — so whenever the env var is unset, nhimbe advertises a dead authorization server to every MCP agent running standard discovery: authorize, token, jwks and the DCR registration_endpoint all pointing at a hostname that no longer resolves.

The agent-readiness surface fails silently, and from the outside it looks like nhimbe's problem rather than a stale constant.

Vercel's fix for nhimbe covered WORKOS_API_HOSTNAME (→ auth.mukoko.com, redeployed). WORKOS_AUTHKIT_DOMAIN was not part of that — which is precisely the condition under which this default takes over.

Changes

  • Default → accounts.mukoko.com. (accounts, plural — account.mukoko.com is the Mukoko Account app, one character apart.)
  • WORKOS_ISSUER accepted as the preferred name, with WORKOS_AUTHKIT_DOMAIN kept as a working alias. The estate spells this value four ways — WORKOS_AUTHKIT_DOMAIN / WORKOS_ISSUER / WORKOS_AUTHORIZATION_SERVER / AUTHKIT_DOMAIN — which is much of why the migration had to be chased service by service.
  • CSP connect-src now allows auth.mukoko.com and accounts.mukoko.com, dropping the two dead hosts. https://*.mukoko.com already covered the new ones so this wasn't breaking — but leaving corpses in an allowlist invites someone to reintroduce them.
  • Corrected proxy.ts / next.config.ts comments that still described the retired pair as current.

Test plan

  • npm run test:run887 tests
  • npm run lint — 0 errors
  • workos-metadata.test.ts updated — it pinned the old default, so it would have kept the dead host green

Companion PRs

Same migration, same branch name:

  • nyuchi/kwelifundi-ingestion's wrangler config (patched via API, would revert on next deploy)
  • nyuchi/kweli-mcp — all three new workers hardcoded the dead host

🤖 Generated with Claude Code

https://claude.ai/code/session_01HFaeL83iEL5gqQXhHweH6u


Generated by Claude Code

…host

nhimbe's `workosAuthkitDomain()` fell back to `identity.nyuchi.com` when
WORKOS_AUTHKIT_DOMAIN was unset. That host was detached by the 10 Aug
2026 issuer migration and now returns Cloudflare error 1014.

A default is not harmless here. Every `.well-known` discovery route and
/auth.md derives its endpoints from this one function, so whenever the
env var is unset nhimbe advertises a dead authorization server to every
MCP agent running standard discovery — authorize, token, JWKS and the
DCR registration endpoint all pointing at a hostname that no longer
resolves. The agent-readiness surface fails silently and from the
outside looks like nhimbe's problem.

Vercel's fix for nhimbe covered WORKOS_API_HOSTNAME (→ auth.mukoko.com,
redeployed). WORKOS_AUTHKIT_DOMAIN was not part of that, which is exactly
when this default takes over.

Also:
- Accept WORKOS_ISSUER as the preferred name, keeping
  WORKOS_AUTHKIT_DOMAIN as a working alias. The estate spells this value
  four different ways, which is much of why the migration had to be
  chased service by service.
- CSP connect-src now allows auth.mukoko.com and accounts.mukoko.com and
  drops the two dead hosts. `https://*.mukoko.com` already covered the
  new ones, so this was not breaking — but leaving the corpses in an
  allowlist invites someone to reintroduce them.
- Corrected the domain references in proxy.ts and next.config.ts
  comments, which still described the retired pair as current.

887 tests pass, lint clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFaeL83iEL5gqQXhHweH6u
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
nhimbe Ready Ready Preview Aug 10, 2026 6:21am

Request Review

@claude

claude Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@bryanfawcett
bryanfawcett marked this pull request as ready for review August 10, 2026 06:23

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@bryanfawcett
bryanfawcett merged commit e13be8f into main Aug 10, 2026
19 checks passed
@bryanfawcett
bryanfawcett deleted the claude/workos-issuer-migration-accounts-mukoko branch August 10, 2026 06:23
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.

2 participants