diff --git a/frontend/src/shared/exp1Invariants.stress.test.ts b/frontend/src/shared/exp1Invariants.stress.test.ts new file mode 100644 index 00000000..70ee4a95 Binary files /dev/null and b/frontend/src/shared/exp1Invariants.stress.test.ts differ diff --git a/frontend/src/shared/googleStartUrl.ts b/frontend/src/shared/googleStartUrl.ts index f47b877c..ef237cc6 100644 --- a/frontend/src/shared/googleStartUrl.ts +++ b/frontend/src/shared/googleStartUrl.ts @@ -15,5 +15,7 @@ export function isUsableInstallId(id: string | undefined | null): boolean { export function googleStartUrl(proxyUrl: string, installId: string, localPort: number): string | null { if (!isUsableInstallId(installId)) return null; const params = new URLSearchParams({ install_id: installId, local_port: String(localPort) }); - return `${proxyUrl.replace(/\/$/, '')}/api/auth/google/start?${params.toString()}`; + // Strip ALL trailing slashes, not one: a settings value ending "com//" produced the path + // "//api/auth/google/start", which is a different path to any server that normalises strictly. + return `${proxyUrl.replace(/\/+$/, '')}/api/auth/google/start?${params.toString()}`; }