fix(cliproxy): use management oauth-callback in paste flow

This commit is contained in:
Brian Le committed 2026-03-03 17:59:10 -05:00
1 parent 6fcd924b1c
commit fa027022a8
3 files changed
+14 -3

No files matched your search

+2 -2
View File
@@ -38,6 +38,7 @@ import {
ProviderOAuthConfig,
CLIPROXY_CALLBACK_PROVIDER_MAP,
getManagementAuthUrlPath,
getManagementOAuthCallbackPath,
normalizeKiroAuthMethod,
} from './auth-types';
import { isHeadlessEnvironment, killProcessOnPort, showStep } from './environment-detector';
@@ -370,8 +371,7 @@ async function handlePasteCallbackMode(
const callbackProvider = CLIPROXY_CALLBACK_PROVIDER_MAP[provider] || provider;
// Note: /oauth-callback is a CLIProxyAPI endpoint (not /v0/management prefix)
const callbackResponse = await fetch(buildProxyUrl(target, '/oauth-callback'), {
const callbackResponse = await fetch(buildProxyUrl(target, getManagementOAuthCallbackPath()), {
method: 'POST',
headers: buildManagementHeaders(target, { 'Content-Type': 'application/json' }),
body: JSON.stringify({