From b6dfa7556b50623d346ff701dd682eef5d86df30 Mon Sep 17 00:00:00 2001 From: Elliott de Launay Date: Tue, 24 Mar 2026 22:22:02 -0400 Subject: [PATCH] refactor(callbackServer): added in i18n translations --- src/i18n/locales/ca/mcp.json | 13 +++++++ src/i18n/locales/de/mcp.json | 13 +++++++ src/i18n/locales/en/mcp.json | 13 +++++++ src/i18n/locales/es/mcp.json | 13 +++++++ src/i18n/locales/fr/mcp.json | 13 +++++++ src/i18n/locales/hi/mcp.json | 13 +++++++ src/i18n/locales/id/mcp.json | 13 +++++++ src/i18n/locales/it/mcp.json | 13 +++++++ src/i18n/locales/ja/mcp.json | 13 +++++++ src/i18n/locales/ko/mcp.json | 13 +++++++ src/i18n/locales/nl/mcp.json | 13 +++++++ src/i18n/locales/pl/mcp.json | 13 +++++++ src/i18n/locales/pt-BR/mcp.json | 13 +++++++ src/i18n/locales/ru/mcp.json | 13 +++++++ src/i18n/locales/tr/mcp.json | 13 +++++++ src/i18n/locales/vi/mcp.json | 13 +++++++ src/i18n/locales/zh-CN/mcp.json | 13 +++++++ src/i18n/locales/zh-TW/mcp.json | 13 +++++++ src/services/mcp/utils/callbackServer.ts | 44 +++++++++++------------- 19 files changed, 255 insertions(+), 23 deletions(-) diff --git a/src/i18n/locales/ca/mcp.json b/src/i18n/locales/ca/mcp.json index dcf3cbc76b..c405f2e89e 100644 --- a/src/i18n/locales/ca/mcp.json +++ b/src/i18n/locales/ca/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Actualitzant tots els servidors MCP...", "all_refreshed": "Tots els servidors MCP han estat actualitzats.", "project_config_deleted": "Fitxer de configuració MCP del projecte eliminat. Tots els servidors MCP del projecte han estat desconnectats." + }, + "oauth": { + "callback": { + "title": "OAuth Callback - Roo Code", + "success": "Success!", + "failed": "Failed", + "auth_failed": "Authentication failed. Please check the MCP server logs.", + "auth_success": "MCP server authenticated successfully. You can now close this browser tab.", + "server_connection_complete": "The server connection is complete.", + "tab_closing_in": "This tab will attempt to close in {{count}}s...", + "safe_to_close": "If the tab did not close, you can safely close it manually.", + "invalid_state": "Error: Invalid state parameter" + } } } diff --git a/src/i18n/locales/de/mcp.json b/src/i18n/locales/de/mcp.json index 30f3a2ed98..42a647ba9d 100644 --- a/src/i18n/locales/de/mcp.json +++ b/src/i18n/locales/de/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Alle MCP-Server werden aktualisiert...", "all_refreshed": "Alle MCP-Server wurden aktualisiert.", "project_config_deleted": "Projekt-MCP-Konfigurationsdatei gelöscht. Alle Projekt-MCP-Server wurden getrennt." + }, + "oauth": { + "callback": { + "title": "OAuth Callback - Roo Code", + "success": "Erfolg!", + "failed": "Fehlgeschlagen", + "auth_failed": "Authentifizierung fehlgeschlagen. Bitte überprüfe die MCP-Server-Logs.", + "auth_success": "MCP-Server erfolgreich authentifiziert. Du kannst diesen Browser-Tab jetzt schließen.", + "server_connection_complete": "Die Serververbindung ist abgeschlossen.", + "tab_closing_in": "Dieser Tab wird in {{count}}s geschlossen...", + "safe_to_close": "Falls sich der Tab nicht automatisch geschlossen hat, kannst du ihn jetzt manuell schließen.", + "invalid_state": "Fehler: Ungültiger State-Parameter" + } } } diff --git a/src/i18n/locales/en/mcp.json b/src/i18n/locales/en/mcp.json index 0200e26d22..2735b03238 100644 --- a/src/i18n/locales/en/mcp.json +++ b/src/i18n/locales/en/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Refreshing all MCP servers...", "all_refreshed": "All MCP servers have been refreshed.", "project_config_deleted": "Project MCP configuration file deleted. All project MCP servers have been disconnected." + }, + "oauth": { + "callback": { + "title": "OAuth Callback - Roo Code", + "success": "Success!", + "failed": "Failed", + "auth_failed": "Authentication failed. Please check the MCP server logs.", + "auth_success": "MCP server authenticated successfully. You can now close this browser tab.", + "server_connection_complete": "The server connection is complete.", + "tab_closing_in": "This tab will attempt to close in {{count}}s...", + "safe_to_close": "If the tab did not close, you can safely close it manually.", + "invalid_state": "Error: Invalid state parameter" + } } } diff --git a/src/i18n/locales/es/mcp.json b/src/i18n/locales/es/mcp.json index 4ee7e9d66f..a9597014cc 100644 --- a/src/i18n/locales/es/mcp.json +++ b/src/i18n/locales/es/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Actualizando todos los servidores MCP...", "all_refreshed": "Todos los servidores MCP han sido actualizados.", "project_config_deleted": "Archivo de configuración MCP del proyecto eliminado. Todos los servidores MCP del proyecto han sido desconectados." + }, + "oauth": { + "callback": { + "title": "OAuth Callback - Roo Code", + "success": "¡Éxito!", + "failed": "Fallido", + "auth_failed": "La autenticación falló. Por favor, comprueba los registros del servidor MCP.", + "auth_success": "Servidor MCP autenticado con éxito. Ya puedes cerrar esta pestaña del navegador.", + "server_connection_complete": "La conexión con el servidor se ha completado.", + "tab_closing_in": "Esta pestaña intentará cerrarse en {{count}}s...", + "safe_to_close": "Si la pestaña no se cerró, puedes cerrarla manualmente de forma segura.", + "invalid_state": "Error: Parámetro de estado no válido" + } } } diff --git a/src/i18n/locales/fr/mcp.json b/src/i18n/locales/fr/mcp.json index 162f938734..9c7260ca4c 100644 --- a/src/i18n/locales/fr/mcp.json +++ b/src/i18n/locales/fr/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Rafraîchissement de tous les serveurs MCP...", "all_refreshed": "Tous les serveurs MCP ont été rafraîchis.", "project_config_deleted": "Fichier de configuration MCP du projet supprimé. Tous les serveurs MCP du projet ont été déconnectés." + }, + "oauth": { + "callback": { + "title": "Rappel OAuth - Roo Code", + "success": "Succès !", + "failed": "Échec", + "auth_failed": "L'authentification a échoué. Veuillez vérifier les journaux du serveur MCP.", + "auth_success": "Le serveur MCP a été authentifié avec succès. Vous pouvez maintenant fermer cet onglet de navigateur.", + "server_connection_complete": "La connexion au serveur est terminée.", + "tab_closing_in": "Cet onglet tentera de se fermer dans {{count}}s...", + "safe_to_close": "Si l'onglet ne s'est pas fermé, vous pouvez le fermer manuellement en toute sécurité.", + "invalid_state": "Erreur : Paramètre d'état invalide" + } } } diff --git a/src/i18n/locales/hi/mcp.json b/src/i18n/locales/hi/mcp.json index 627aca205c..e91a9d9709 100644 --- a/src/i18n/locales/hi/mcp.json +++ b/src/i18n/locales/hi/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "सभी एमसीपी सर्वर रीफ्रेश हो रहे हैं...", "all_refreshed": "सभी एमसीपी सर्वर रीफ्रेश हो गए हैं।", "project_config_deleted": "प्रोजेक्ट एमसीपी कॉन्फ़िगरेशन फ़ाइल हटा दी गई है। सभी प्रोजेक्ट एमसीपी सर्वर डिस्कनेक्ट कर दिए गए हैं।" + }, + "oauth": { + "callback": { + "title": "OAuth कॉलबैक - Roo Code", + "success": "सफलता!", + "failed": "विफल", + "auth_failed": "प्रमाणीकरण विफल रहा। कृपया MCP सर्वर लॉग की जाँच करें।", + "auth_success": "MCP सर्वर सफलतापूर्वक प्रमाणित हो गया। अब आप इस ब्राउज़र टैब को बंद कर सकते हैं।", + "server_connection_complete": "सर्वर कनेक्शन पूरा हो गया है।", + "tab_closing_in": "यह टैब {{count}} सेकंड में बंद होने का प्रयास करेगा...", + "safe_to_close": "यदि टैब बंद नहीं हुआ, तो आप इसे सुरक्षित रूप से मैन्युअल रूप से बंद कर सकते हैं।", + "invalid_state": "त्रुटि: अमान्य स्थिति पैरामीटर" + } } } diff --git a/src/i18n/locales/id/mcp.json b/src/i18n/locales/id/mcp.json index 60c0924244..5e2255f520 100644 --- a/src/i18n/locales/id/mcp.json +++ b/src/i18n/locales/id/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Me-refresh semua server MCP...", "all_refreshed": "Semua server MCP telah di-refresh.", "project_config_deleted": "File konfigurasi MCP proyek dihapus. Semua server MCP proyek telah diputus koneksinya." + }, + "oauth": { + "callback": { + "title": "Callback OAuth - Roo Code", + "success": "Berhasil!", + "failed": "Gagal", + "auth_failed": "Autentikasi gagal. Silakan periksa log server MCP.", + "auth_success": "Server MCP berhasil diautentikasi. Anda sekarang dapat menutup tab browser ini.", + "server_connection_complete": "Koneksi server selesai.", + "tab_closing_in": "Tab ini akan mencoba menutup dalam {{count}} detik...", + "safe_to_close": "Jika tab tidak tertutup, Anda dapat menutupnya secara manual dengan aman.", + "invalid_state": "Kesalahan: Parameter state tidak valid" + } } } diff --git a/src/i18n/locales/it/mcp.json b/src/i18n/locales/it/mcp.json index 2c890d10f7..dd257118f2 100644 --- a/src/i18n/locales/it/mcp.json +++ b/src/i18n/locales/it/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Aggiornamento di tutti i server MCP...", "all_refreshed": "Tutti i server MCP sono stati aggiornati.", "project_config_deleted": "File di configurazione MCP del progetto eliminato. Tutti i server MCP del progetto sono stati disconnessi." + }, + "oauth": { + "callback": { + "title": "Callback OAuth - Roo Code", + "success": "Successo!", + "failed": "Fallito", + "auth_failed": "Autenticazione fallita. Controlla i log del server MCP.", + "auth_success": "Server MCP autenticato con successo. Ora puoi chiudere questa scheda del browser.", + "server_connection_complete": "La connessione al server è completa.", + "tab_closing_in": "Questa scheda tenterà di chiudersi tra {{count}}s...", + "safe_to_close": "Se la scheda non si è chiusa, puoi chiuderla manualmente in sicurezza.", + "invalid_state": "Errore: Parametro di stato non valido" + } } } diff --git a/src/i18n/locales/ja/mcp.json b/src/i18n/locales/ja/mcp.json index 87c4e0d8ad..cf8788b0e1 100644 --- a/src/i18n/locales/ja/mcp.json +++ b/src/i18n/locales/ja/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "すべてのMCPサーバーを更新しています...", "all_refreshed": "すべてのMCPサーバーが更新されました。", "project_config_deleted": "プロジェクトMCP設定ファイルが削除されました。すべてのプロジェクトMCPサーバーが切断されました。" + }, + "oauth": { + "callback": { + "title": "OAuth コールバック - Roo Code", + "success": "成功!", + "failed": "失敗", + "auth_failed": "認証に失敗しました。MCP サーバーのログを確認してください。", + "auth_success": "MCP サーバーの認証に成功しました。このブラウザタブを閉じても構いません。", + "server_connection_complete": "サーバー接続が完了しました。", + "tab_closing_in": "このタブは {{count}} 秒後に閉じられます...", + "safe_to_close": "タブが閉じなかった場合は、手動で閉じてください。", + "invalid_state": "エラー: 無効な state パラメータ" + } } } diff --git a/src/i18n/locales/ko/mcp.json b/src/i18n/locales/ko/mcp.json index 051ca82e83..441d8e0729 100644 --- a/src/i18n/locales/ko/mcp.json +++ b/src/i18n/locales/ko/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "모든 MCP 서버를 새로 고치는 중...", "all_refreshed": "모든 MCP 서버가 새로 고쳐졌습니다.", "project_config_deleted": "프로젝트 MCP 구성 파일이 삭제되었습니다. 모든 프로젝트 MCP 서버가 연결 해제되었습니다." + }, + "oauth": { + "callback": { + "title": "OAuth 콜백 - Roo Code", + "success": "성공!", + "failed": "실패", + "auth_failed": "인증에 실패했습니다. MCP 서버 로그를 확인해 주세요.", + "auth_success": "MCP 서버 인증에 성공했습니다. 이제 이 브라우저 탭을 닫으셔도 됩니다.", + "server_connection_complete": "서버 연결이 완료되었습니다.", + "tab_closing_in": "이 탭은 {{count}}초 후에 닫힙니다...", + "safe_to_close": "탭이 자동으로 닫히지 않으면 직접 닫아주세요.", + "invalid_state": "오류: 유효하지 않은 state 파라미터" + } } } diff --git a/src/i18n/locales/nl/mcp.json b/src/i18n/locales/nl/mcp.json index 4599e87bdf..d6382f8458 100644 --- a/src/i18n/locales/nl/mcp.json +++ b/src/i18n/locales/nl/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Alle MCP-servers worden vernieuwd...", "all_refreshed": "Alle MCP-servers zijn vernieuwd.", "project_config_deleted": "Project MCP-configuratiebestand verwijderd. Alle project MCP-servers zijn losgekoppeld." + }, + "oauth": { + "callback": { + "title": "OAuth Callback - Roo Code", + "success": "Succes!", + "failed": "Mislukt", + "auth_failed": "Authenticatie mislukt. Controleer de MCP-serverlogs.", + "auth_success": "MCP-server succesvol geauthenticeerd. Je kunt dit browsertabblad nu sluiten.", + "server_connection_complete": "De serververbinding is voltooid.", + "tab_closing_in": "Dit tabblad wordt gesloten over {{count}}s...", + "safe_to_close": "Als het tabblad niet is gesloten, kun je het handmatig sluiten.", + "invalid_state": "Fout: Ongeldige state-parameter" + } } } diff --git a/src/i18n/locales/pl/mcp.json b/src/i18n/locales/pl/mcp.json index a653676514..1949534590 100644 --- a/src/i18n/locales/pl/mcp.json +++ b/src/i18n/locales/pl/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Odświeżanie wszystkich serwerów MCP...", "all_refreshed": "Wszystkie serwery MCP zostały odświeżone.", "project_config_deleted": "Plik konfiguracyjny MCP projektu został usunięty. Wszystkie serwery MCP projektu zostały odłączone." + }, + "oauth": { + "callback": { + "title": "Wywołanie zwrotne OAuth - Roo Code", + "success": "Sukces!", + "failed": "Niepowodzenie", + "auth_failed": "Uwierzytelnianie nie powiodło się. Sprawdź dzienniki serwera MCP.", + "auth_success": "Serwer MCP został pomyślnie uwierzytelniony. Możesz teraz zamknąć tę kartę przeglądarki.", + "server_connection_complete": "Połączenie z serwerem zostało zakończone.", + "tab_closing_in": "Ta karta spróbuje się zamknąć za {{count}}s...", + "safe_to_close": "Jeśli karta nie zamknęła się automatycznie, możesz ją bezpiecznie zamknąć ręcznie.", + "invalid_state": "Błąd: Nieprawidłowy parametr stanu" + } } } diff --git a/src/i18n/locales/pt-BR/mcp.json b/src/i18n/locales/pt-BR/mcp.json index fbf22e7aa2..332dfa922f 100644 --- a/src/i18n/locales/pt-BR/mcp.json +++ b/src/i18n/locales/pt-BR/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Atualizando todos os servidores MCP...", "all_refreshed": "Todos os servidores MCP foram atualizados.", "project_config_deleted": "Arquivo de configuração MCP do projeto excluído. Todos os servidores MCP do projeto foram desconectados." + }, + "oauth": { + "callback": { + "title": "Callback OAuth - Roo Code", + "success": "Sucesso!", + "failed": "Falhou", + "auth_failed": "A autenticação falhou. Verifique os logs do servidor MCP.", + "auth_success": "Servidor MCP autenticado com sucesso. Você já pode fechar esta aba do navegador.", + "server_connection_complete": "A conexão com o servidor foi concluída.", + "tab_closing_in": "Esta aba tentará fechar em {{count}}s...", + "safe_to_close": "Se a aba não fechar, você pode fechá-la manualmente com segurança.", + "invalid_state": "Erro: Parâmetro de estado inválido" + } } } diff --git a/src/i18n/locales/ru/mcp.json b/src/i18n/locales/ru/mcp.json index 581db3cd8d..b9090b939e 100644 --- a/src/i18n/locales/ru/mcp.json +++ b/src/i18n/locales/ru/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Обновление всех MCP серверов...", "all_refreshed": "Все MCP серверы обновлены.", "project_config_deleted": "Файл конфигурации MCP проекта удален. Все MCP серверы проекта отключены." + }, + "oauth": { + "callback": { + "title": "OAuth Callback - Roo Code", + "success": "Успешно!", + "failed": "Ошибка", + "auth_failed": "Ошибка аутентификации. Пожалуйста, проверьте логи MCP-сервера.", + "auth_success": "MCP-сервер успешно аутентифицирован. Теперь вы можете закрыть эту вкладку браузера.", + "server_connection_complete": "Подключение к серверу завершено.", + "tab_closing_in": "Эта вкладка попытается закрыться через {{count}} сек...", + "safe_to_close": "Если вкладка не закрылась, вы можете закрыть ее вручную.", + "invalid_state": "Ошибка: Недопустимый параметр состояния" + } } } diff --git a/src/i18n/locales/tr/mcp.json b/src/i18n/locales/tr/mcp.json index 58e1bf1a74..9a6c6fbfc0 100644 --- a/src/i18n/locales/tr/mcp.json +++ b/src/i18n/locales/tr/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Tüm MCP sunucuları yenileniyor...", "all_refreshed": "Tüm MCP sunucuları yenilendi.", "project_config_deleted": "Proje MCP yapılandırma dosyası silindi. Tüm proje MCP sunucuları bağlantısı kesildi." + }, + "oauth": { + "callback": { + "title": "OAuth Geri Çağırma - Roo Code", + "success": "Başarılı!", + "failed": "Başarısız", + "auth_failed": "Kimlik doğrulama başarısız oldu. Lütfen MCP sunucu günlüklerini kontrol edin.", + "auth_success": "MCP sunucusu başarıyla doğrulandı. Artık bu tarayıcı sekmesini kapatabilirsiniz.", + "server_connection_complete": "Sunucu bağlantısı tamamlandı.", + "tab_closing_in": "Bu sekme {{count}} saniye içinde kapanmaya çalışacak...", + "safe_to_close": "Sekme kapanmadıysa, manuel olarak güvenle kapatabilirsiniz.", + "invalid_state": "Hata: Geçersiz durum parametresi" + } } } diff --git a/src/i18n/locales/vi/mcp.json b/src/i18n/locales/vi/mcp.json index 7e529b4874..9d1e1f3886 100644 --- a/src/i18n/locales/vi/mcp.json +++ b/src/i18n/locales/vi/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "Đang làm mới tất cả các máy chủ MCP...", "all_refreshed": "Tất cả các máy chủ MCP đã được làm mới.", "project_config_deleted": "Tệp cấu hình MCP của dự án đã bị xóa. Tất cả các máy chủ MCP của dự án đã bị ngắt kết nối." + }, + "oauth": { + "callback": { + "title": "OAuth Callback - Roo Code", + "success": "Thành công!", + "failed": "Thất bại", + "auth_failed": "Xác thực thất bại. Vui lòng kiểm tra nhật ký máy chủ MCP.", + "auth_success": "Máy chủ MCP đã được xác thực thành công. Bây giờ bạn có thể đóng tab trình duyệt này.", + "server_connection_complete": "Kết nối máy chủ đã hoàn tất.", + "tab_closing_in": "Tab này sẽ cố gắng đóng sau {{count}} giây...", + "safe_to_close": "Nếu tab không đóng, bạn có thể đóng nó một cách thủ công an toàn.", + "invalid_state": "Lỗi: Tham số trạng thái không hợp lệ" + } } } diff --git a/src/i18n/locales/zh-CN/mcp.json b/src/i18n/locales/zh-CN/mcp.json index 58e8fcec3d..aaa8fe5d24 100644 --- a/src/i18n/locales/zh-CN/mcp.json +++ b/src/i18n/locales/zh-CN/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "正在刷新所有 MCP 服务器...", "all_refreshed": "所有 MCP 服务器已刷新。", "project_config_deleted": "项目MCP配置文件已删除。所有项目MCP服务器已断开连接。" + }, + "oauth": { + "callback": { + "title": "OAuth 回调 - Roo Code", + "success": "成功!", + "failed": "失败", + "auth_failed": "身份验证失败。请检查 MCP 服务器日志。", + "auth_success": "MCP 服务器身份验证成功。您现在可以关闭此浏览器标签页。", + "server_connection_complete": "服务器连接已完成。", + "tab_closing_in": "此标签页将在 {{count}} 秒后尝试关闭...", + "safe_to_close": "如果标签页没有关闭,您可以安全地手动关闭它。", + "invalid_state": "错误:无效的状态参数" + } } } diff --git a/src/i18n/locales/zh-TW/mcp.json b/src/i18n/locales/zh-TW/mcp.json index 945f09fc0c..7f6af26ce4 100644 --- a/src/i18n/locales/zh-TW/mcp.json +++ b/src/i18n/locales/zh-TW/mcp.json @@ -24,5 +24,18 @@ "refreshing_all": "正在重新整理所有 MCP 伺服器...", "all_refreshed": "所有 MCP 伺服器已重新整理。", "project_config_deleted": "專案MCP設定檔案已刪除。所有專案MCP伺服器已斷開連接。" + }, + "oauth": { + "callback": { + "title": "OAuth 回呼 - Roo Code", + "success": "成功!", + "failed": "失敗", + "auth_failed": "身分驗證失敗。請檢查 MCP 伺服器日誌。", + "auth_success": "MCP 伺服器身分驗證成功。您現在可以關閉此瀏覽器分頁。", + "server_connection_complete": "伺服器連接已完成。", + "tab_closing_in": "此分頁將在 {{count}} 秒後嘗試關閉...", + "safe_to_close": "如果分頁沒有關閉,您可以安全地手動關閉它。", + "invalid_state": "錯誤:無效的狀態參數" + } } } diff --git a/src/services/mcp/utils/callbackServer.ts b/src/services/mcp/utils/callbackServer.ts index ecc266f394..ac7a421058 100644 --- a/src/services/mcp/utils/callbackServer.ts +++ b/src/services/mcp/utils/callbackServer.ts @@ -1,4 +1,5 @@ import * as http from "http" +import { t } from "../../../i18n" export interface CallbackResult { code?: string @@ -73,22 +74,23 @@ export function startCallbackServer( const error = url.searchParams.get("error") const errorDescription = url.searchParams.get("error_description") const state = url.searchParams.get("state") + const hasError = !!error // Verify state for CSRF protection if (expectedState && state !== expectedState) { res.writeHead(400, { "Content-Type": "text/html" }) res.end(` - - - - OAuth Callback - - -

OAuth Authentication Failed

-

Error: Invalid state parameter

- - - `) + + + + ${t("mcp:oauth.callback.title")} + + +

${t("mcp:oauth.callback.failed")}

+

${t("mcp:oauth.callback.invalid_state")}

+ + + `) rejectResult(new Error("Invalid state parameter")) return } @@ -99,7 +101,7 @@ export function startCallbackServer( - OAuth Callback - Roo Code + ${t("mcp:oauth.callback.title")} -

${error ? "Failed" : "Success!"}

-
+

${hasError ? t("mcp:oauth.callback.failed") : t("mcp:oauth.callback.success")}

+

- ${ - error - ? "Authentication failed. Please check the MCP server logs." - : "MCP server authenticated successfully. You can now close this browser tab." - } + ${hasError ? t("mcp:oauth.callback.auth_failed") : t("mcp:oauth.callback.auth_success")}

-
The server connection is complete.
+
${t("mcp:oauth.callback.server_connection_complete")}