mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
refactor(oauth): derive auth-code providers from OAUTH_FLOW_TYPES (DRY)
- Update checkAuthCodePorts() to filter from CLIPROXY_PROFILES - Update header comment to list all OAuth ports including Claude - Addresses PR #384 review round 3
This commit is contained in:
@@ -8,7 +8,11 @@
|
||||
* - Gemini: 8085
|
||||
* - Codex: 1455
|
||||
* - Agy: 51121
|
||||
* - iFlow: 11451
|
||||
* - Kiro: 9876
|
||||
* - Claude: 54545
|
||||
* - Qwen: Device Code Flow (no port needed)
|
||||
* - GHCP: Device Code Flow (no port needed)
|
||||
*/
|
||||
|
||||
import {
|
||||
@@ -156,7 +160,8 @@ export async function checkAllOAuthPorts(): Promise<OAuthPortDiagnostic[]> {
|
||||
* Check OAuth ports for providers that use Authorization Code flow only
|
||||
*/
|
||||
export async function checkAuthCodePorts(): Promise<OAuthPortDiagnostic[]> {
|
||||
const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'iflow', 'kiro', 'claude'];
|
||||
// Filter providers that use authorization_code flow (DRY: derive from OAUTH_FLOW_TYPES)
|
||||
const providers = CLIPROXY_PROFILES.filter((p) => OAUTH_FLOW_TYPES[p] === 'authorization_code');
|
||||
const results: OAuthPortDiagnostic[] = [];
|
||||
|
||||
for (const provider of providers) {
|
||||
|
||||
Reference in New Issue
Block a user