From 1d200222ed903140a30ac4a2946c220ed4ac3148 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Thu, 30 Jul 2026 14:19:23 +0000 Subject: [PATCH] fix(cli): default `logicsrc login` to logicsrc.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default API origin was the generated Railway hostname (logicsrc-credentials-production.up.railway.app), which leaked deployment infrastructure into every login prompt and stored identity. Point it at the production domain instead. NOTE: logicsrc.com does not currently serve the credentials app's CLI routes — /cli/device/code, /cli/device/token, /cli/authorize, /cli/token, and /api/me live in apps/pwa (src/routes/cli.mjs), while the apex serves apps/logicsrc-web. At time of writing all of those return 404 on logicsrc.com and 200 on the Railway origin, so login will fail until the apex (or a subdomain) is pointed at the pwa service. $LOGICSRC_API overrides the default in the meantime. Co-Authored-By: Claude Opus 5 (1M context) --- plugins/credential-sharing/src/identity.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/credential-sharing/src/identity.ts b/plugins/credential-sharing/src/identity.ts index a5f91d9..f2f4695 100644 --- a/plugins/credential-sharing/src/identity.ts +++ b/plugins/credential-sharing/src/identity.ts @@ -39,11 +39,16 @@ export function identityPath(): string { } /** - * The hosted LogicSRC credentials app (`apps/pwa`) — where `logicsrc login` - * goes when nothing else is configured. This is deliberately NOT logicsrc.com: - * that origin serves the marketing site and has no /cli routes. + * Where `logicsrc login` goes when nothing else is configured: the production + * origin, not a generated Railway hostname. + * + * REQUIRES that logicsrc.com serve the credentials app's CLI routes + * (`/cli/device/code`, `/cli/device/token`, `/cli/authorize`, `/cli/token`, + * `/api/me` — see apps/pwa/src/routes/cli.mjs). Until the apex is pointed at + * that service, login fails with a 404 on the first request; set $LOGICSRC_API + * to the deployment origin to work around it. */ -export const DEFAULT_API_URL = "https://logicsrc-credentials-production.up.railway.app"; +export const DEFAULT_API_URL = "https://logicsrc.com"; /** An explicitly configured API origin, if any. `LOGICSRC_API` is the documented one. */ export function envApiUrl(): string | undefined {