fix: correct the dead WorkOS hosts and canonical origin in .env.example - #130
Merged
Conversation
.env.example still told anyone copying it to set
WORKOS_API_HOSTNAME=api.identity.nyuchi.com
That host was detached in the Aug 2026 issuer migration: it resolves but
refuses connections (curl 000), so a fresh checkout following the example
gets a hosted sign-in redirect that succeeds and a /callback code exchange
that fails -- the exact split the file's own warning above it describes.
next.config.ts already documents the migration correctly; only the example
was left behind.
Corrected to auth.mukoko.com (the WorkOS auth API, where SDK calls and the
JWKS fetch go) and added the missing WORKOS_AUTHKIT_DOMAIN with
accounts.mukoko.com (the AuthKit issuer -- the OAuth 2.1 authorization
server every .well-known route and /auth.md advertises). Both carry a note
on what the host is and is not, since advertising the auth API where the
issuer belongs produces metadata that validates but dead-ends at discovery.
Also fixes NEXT_PUBLIC_SITE_URL, which the example set to nhimbe.com while
the code default and the documented canonical origin are events.mukoko.com.
Production is dual-domain, but that variable picks the ONE origin every
canonical tag, OG image, sitemap entry, JSON-LD block and .well-known
resource points at -- so the example was quietly repointing all of them at
the secondary domain. NEXT_PUBLIC_WORKOS_REDIRECT_URI now matches it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFaeL83iEL5gqQXhHweH6u
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
bryanfawcett
marked this pull request as ready for review
August 12, 2026 11:32
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while fixing the same stale host in three deployed worker configs across
nyuchi/nyuchi-docsandnyuchi/mukoko-platform. This repo's runtime config is fine —next.config.tsalready documents the Aug 2026 issuer migration correctly, andsrc/lib/auth/workos-metadata.tsdefaults toaccounts.mukoko.com. Only.env.examplewas left behind, which matters because it is the file people copy.The dead host
.env.exampletold anyone copying it to setWORKOS_API_HOSTNAME=api.identity.nyuchi.com. A fresh checkout following it gets a hosted sign-in redirect that succeeds and a/callbackcode exchange that fails — precisely the environment-split failure the warning a few lines above it describes, which is a miserable thing to debug because the failure is nowhere near the cause.Changes
WORKOS_API_HOSTNAMEapi.identity.nyuchi.com(dead)auth.mukoko.com— the WorkOS auth API, where SDK calls and the bearer verifier's JWKS fetch goWORKOS_AUTHKIT_DOMAINaccounts.mukoko.com— the AuthKit issuer, the OAuth 2.1 authorization server every.well-known/*route and/auth.mdadvertisesNEXT_PUBLIC_SITE_URLhttps://nhimbe.comhttps://events.mukoko.comNEXT_PUBLIC_WORKOS_REDIRECT_URIhttps://nhimbe.com/callbackhttps://events.mukoko.com/callback(matches the above)Both host comments now state what the host is not, because the two are not interchangeable:
auth.mukoko.comserves no authorization-server metadata, so a client following an issuer pointer there finds no discovery document and the flow dies before sign-in. That is the mistake the comment exists to prevent.Why
NEXT_PUBLIC_SITE_URLwas also wrongProduction is genuinely dual-domain — both
nhimbe.comandevents.mukoko.comserve the app — sonhimbe.comlooks harmless. But this variable does not pick "a domain the app answers on", it picks the one origin that every self-referential URL points at: canonical tags, OG/Twitter images,sitemap.xml,robots.txt, schema.org JSON-LD, and the.well-knownOAuthresource. The documented primary and the code default insrc/lib/site-url.tsare bothevents.mukoko.com, so the example was quietly repointing all of those at the secondary domain — the duplicate-content split the consolidation exists to avoid.Deliberately left alone
https://nhimbe.com/api/webhooks/workos— that is the endpoint actually registered in the WorkOS dashboard, so it is a true statement about what exists, not a stale default.RELEASES.md's mention of the oldauthenticate.nyuchi.com/identity.nyuchi.compair — release notes are a historical record of what shipped then, and rewriting history to match today's hosts would make them wrong in a different way.next.config.ts— already correct, and already says the old pair no longer resolves.No code changes, so no behaviour change:
.env.exampleis not read at build or runtime.🤖 Generated with Claude Code
https://claude.ai/code/session_01HFaeL83iEL5gqQXhHweH6u
Generated by Claude Code