mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-15 00:17:09 +00:00
fix(cliproxy): use management oauth-callback in paste flow
This commit is contained in:
3 files changed
+14
-3
No files matched your search
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user