From 32a5ac319c96c653890578afd385650e952eb716 Mon Sep 17 00:00:00 2001 From: Emilio Amaya Date: Mon, 26 Jan 2026 17:01:50 -0500 Subject: [PATCH] fix: construct full URL when using --token for headless login When using `npx atxp login --token `, the raw token was saved directly to the config file. However, the @atxp/client library expects a full URL format with the connection_token parameter. This caused "Invalid URL" errors when trying to use any ATXP tools after headless login. Co-Authored-By: Claude Opus 4.5 --- packages/atxp/src/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/atxp/src/login.ts b/packages/atxp/src/login.ts index 2c98a96..b36c369 100644 --- a/packages/atxp/src/login.ts +++ b/packages/atxp/src/login.ts @@ -33,7 +33,7 @@ export async function login(options: LoginOptions = {}): Promise { // If token provided directly, use it (headless mode) if (options.token) { - connectionString = options.token; + connectionString = `https://accounts.atxp.ai?connection_token=${options.token}`; console.log('Using provided token for headless authentication...'); } else if (options.qr) { // QR code mode explicitly requested