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": "Codex 啟用 Fast 服務等級",
|
||||
"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