Skip to content

Commit f4bf6f0

Browse files
emilioaccclaude
andauthored
fix: construct full URL when using --token for headless login (#21)
When using `npx atxp login --token <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 <noreply@anthropic.com>
1 parent 9a91659 commit f4bf6f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/atxp/src/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export async function login(options: LoginOptions = {}): Promise<void> {
3333

3434
// If token provided directly, use it (headless mode)
3535
if (options.token) {
36-
connectionString = options.token;
36+
connectionString = `https://accounts.atxp.ai?connection_token=${options.token}`;
3737
console.log('Using provided token for headless authentication...');
3838
} else if (options.qr) {
3939
// QR code mode explicitly requested

0 commit comments

Comments
 (0)