fix: local updates for PR #4873

Co-authored-by: Hisleren <Hisleren@users.noreply.github.com>
This commit is contained in:
Gustavo Madeira Santana
2026-01-30 16:11:10 -05:00
committed by Gustavo Madeira Santana
parent 201d7fa956
commit e5a95b5b66
6 changed files with 173 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ import type { RuntimeEnv } from "../runtime.js";
import { note } from "../terminal/note.js";
import { buildGatewayAuthConfig } from "./configure.gateway-auth.js";
import { confirm, select, text } from "./configure.shared.js";
import { guardCancel, randomToken } from "./onboard-helpers.js";
import { guardCancel, normalizeGatewayTokenInput, randomToken } from "./onboard-helpers.js";
type GatewayAuthChoice = "token" | "password";
@@ -177,8 +177,7 @@ export async function promptGatewayConfig(
}),
runtime,
);
const rawInput = tokenInput ? String(tokenInput).trim() : "";
gatewayToken = rawInput || randomToken();
gatewayToken = normalizeGatewayTokenInput(tokenInput) || randomToken();
}
if (authMode === "password") {