feat(settings): add ChatGPT OAuth device code login for Codex CLI
Add OAuth device code flow for Codex CLI official subscription auth, allowing users to log in with their ChatGPT account directly from the agent settings page without using the terminal. - Backend: two new endpoints (codex_request_device_code, codex_poll_device_code) that handle the OpenAI OAuth device code flow and return tokens to frontend - Frontend: login UI with verification URL, copyable user code, polling status, 15-minute timeout, and auto-save via existing persistEnv/persistConfig path - Auth.json written in Codex CLI compatible format (nested tokens, account_id, last_refresh) so codex-acp can use OAuth tokens directly - Show logged-in status and re-login option when tokens are present - Remove auth.json textarea from Codex settings UI - i18n: all 10 languages updated with new login-related keys
This commit is contained in:
@@ -557,7 +557,21 @@
|
||||
"enableFast": "تفعيل Fast",
|
||||
"enableFastAria": "تفعيل مستوى خدمة Fast لـ Codex",
|
||||
"authJsonNative": "auth.json (أصلي)",
|
||||
"configTomlNative": "config.toml (أصلي)"
|
||||
"configTomlNative": "config.toml (أصلي)",
|
||||
"loginButton": "تسجيل الدخول باستخدام ChatGPT",
|
||||
"loginRequesting": "جارٍ طلب رمز تسجيل الدخول...",
|
||||
"loginStep1": "افتح الرابط التالي في متصفحك:",
|
||||
"loginStep2": "أدخل الرمز أدناه:",
|
||||
"loginPolling": "في انتظار التفويض...",
|
||||
"loginCancel": "إلغاء",
|
||||
"loginSuccess": "تم تسجيل الدخول بنجاح، تم حفظ الإعدادات!",
|
||||
"loginFailed": "فشل تسجيل الدخول: {message}",
|
||||
"loginRetry": "إعادة المحاولة",
|
||||
"loginCodeCopied": "تم نسخ الرمز",
|
||||
"loggedIn": "تم تسجيل الدخول",
|
||||
"loginRelogin": "إعادة تسجيل الدخول / تبديل الحساب",
|
||||
"loginTimeout": "انتهت مهلة تسجيل الدخول، يرجى المحاولة مرة أخرى",
|
||||
"loginSaveFailed": "تم تسجيل الدخول بنجاح ولكن فشل حفظ الإعدادات"
|
||||
},
|
||||
"gemini": {
|
||||
"authConfig": "إعداد مصادقة Gemini",
|
||||
|
||||
Reference in New Issue
Block a user