mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-19 03:00:49 +08:00
fix(oauth): remove iFlow provider from OAuth flow
This commit is contained in:
@@ -59,11 +59,10 @@ const PROVIDERS: { id: OAuthProvider; titleKey: string; hintKey: string; urlLabe
|
|||||||
{ id: 'anthropic', titleKey: 'auth_login.anthropic_oauth_title', hintKey: 'auth_login.anthropic_oauth_hint', urlLabelKey: 'auth_login.anthropic_oauth_url_label', icon: iconClaude },
|
{ id: 'anthropic', titleKey: 'auth_login.anthropic_oauth_title', hintKey: 'auth_login.anthropic_oauth_hint', urlLabelKey: 'auth_login.anthropic_oauth_url_label', icon: iconClaude },
|
||||||
{ id: 'antigravity', titleKey: 'auth_login.antigravity_oauth_title', hintKey: 'auth_login.antigravity_oauth_hint', urlLabelKey: 'auth_login.antigravity_oauth_url_label', icon: iconAntigravity },
|
{ id: 'antigravity', titleKey: 'auth_login.antigravity_oauth_title', hintKey: 'auth_login.antigravity_oauth_hint', urlLabelKey: 'auth_login.antigravity_oauth_url_label', icon: iconAntigravity },
|
||||||
{ id: 'gemini-cli', titleKey: 'auth_login.gemini_cli_oauth_title', hintKey: 'auth_login.gemini_cli_oauth_hint', urlLabelKey: 'auth_login.gemini_cli_oauth_url_label', icon: iconGemini },
|
{ id: 'gemini-cli', titleKey: 'auth_login.gemini_cli_oauth_title', hintKey: 'auth_login.gemini_cli_oauth_hint', urlLabelKey: 'auth_login.gemini_cli_oauth_url_label', icon: iconGemini },
|
||||||
{ id: 'qwen', titleKey: 'auth_login.qwen_oauth_title', hintKey: 'auth_login.qwen_oauth_hint', urlLabelKey: 'auth_login.qwen_oauth_url_label', icon: iconQwen },
|
{ id: 'qwen', titleKey: 'auth_login.qwen_oauth_title', hintKey: 'auth_login.qwen_oauth_hint', urlLabelKey: 'auth_login.qwen_oauth_url_label', icon: iconQwen }
|
||||||
{ id: 'iflow', titleKey: 'auth_login.iflow_oauth_title', hintKey: 'auth_login.iflow_oauth_hint', urlLabelKey: 'auth_login.iflow_oauth_url_label', icon: iconIflow }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const CALLBACK_SUPPORTED: OAuthProvider[] = ['codex', 'anthropic', 'antigravity', 'gemini-cli', 'iflow'];
|
const CALLBACK_SUPPORTED: OAuthProvider[] = ['codex', 'anthropic', 'antigravity', 'gemini-cli'];
|
||||||
const getProviderI18nPrefix = (provider: OAuthProvider) => provider.replace('-', '_');
|
const getProviderI18nPrefix = (provider: OAuthProvider) => provider.replace('-', '_');
|
||||||
const getAuthKey = (provider: OAuthProvider, suffix: string) =>
|
const getAuthKey = (provider: OAuthProvider, suffix: string) =>
|
||||||
`auth_login.${getProviderI18nPrefix(provider)}_${suffix}`;
|
`auth_login.${getProviderI18nPrefix(provider)}_${suffix}`;
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ export type OAuthProvider =
|
|||||||
| 'anthropic'
|
| 'anthropic'
|
||||||
| 'antigravity'
|
| 'antigravity'
|
||||||
| 'gemini-cli'
|
| 'gemini-cli'
|
||||||
| 'qwen'
|
| 'qwen';
|
||||||
| 'iflow';
|
|
||||||
|
|
||||||
export interface OAuthStartResponse {
|
export interface OAuthStartResponse {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -30,7 +29,7 @@ export interface IFlowCookieAuthResponse {
|
|||||||
type?: string;
|
type?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const WEBUI_SUPPORTED: OAuthProvider[] = ['codex', 'anthropic', 'antigravity', 'gemini-cli', 'iflow'];
|
const WEBUI_SUPPORTED: OAuthProvider[] = ['codex', 'anthropic', 'antigravity', 'gemini-cli'];
|
||||||
const CALLBACK_PROVIDER_MAP: Partial<Record<OAuthProvider, string>> = {
|
const CALLBACK_PROVIDER_MAP: Partial<Record<OAuthProvider, string>> = {
|
||||||
'gemini-cli': 'gemini'
|
'gemini-cli': 'gemini'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ export type OAuthProvider =
|
|||||||
| 'anthropic'
|
| 'anthropic'
|
||||||
| 'antigravity'
|
| 'antigravity'
|
||||||
| 'gemini-cli'
|
| 'gemini-cli'
|
||||||
| 'qwen'
|
| 'qwen';
|
||||||
| 'iflow';
|
|
||||||
|
|
||||||
// OAuth 流程状态
|
// OAuth 流程状态
|
||||||
export interface OAuthFlow {
|
export interface OAuthFlow {
|
||||||
|
|||||||
@@ -42,16 +42,14 @@ export const OAUTH_CARD_IDS = [
|
|||||||
'anthropic-oauth-card',
|
'anthropic-oauth-card',
|
||||||
'antigravity-oauth-card',
|
'antigravity-oauth-card',
|
||||||
'gemini-cli-oauth-card',
|
'gemini-cli-oauth-card',
|
||||||
'qwen-oauth-card',
|
'qwen-oauth-card'
|
||||||
'iflow-oauth-card'
|
|
||||||
];
|
];
|
||||||
export const OAUTH_PROVIDERS = {
|
export const OAUTH_PROVIDERS = {
|
||||||
CODEX: 'codex',
|
CODEX: 'codex',
|
||||||
ANTHROPIC: 'anthropic',
|
ANTHROPIC: 'anthropic',
|
||||||
ANTIGRAVITY: 'antigravity',
|
ANTIGRAVITY: 'antigravity',
|
||||||
GEMINI_CLI: 'gemini-cli',
|
GEMINI_CLI: 'gemini-cli',
|
||||||
QWEN: 'qwen',
|
QWEN: 'qwen'
|
||||||
IFLOW: 'iflow'
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
// API 端点
|
// API 端点
|
||||||
|
|||||||
Reference in New Issue
Block a user