feat: add Telegram account linking UI with CSRF protection

- TelegramLinkWidget component with Login Widget for browser users
- One-click initData linking for Mini App users
- LinkTelegramCallback page with CSRF state validation
- URL credential clearing via history.replaceState
- Merge flow support with replace navigation
- i18n keys for all 4 locales (ru, en, zh, fa)
This commit is contained in:
Fringg
2026-03-04 17:03:48 +03:00
parent 584f00297b
commit a6fabb1d9d
8 changed files with 256 additions and 13 deletions

View File

@@ -3615,6 +3615,8 @@
"unlinkError": "Failed to disconnect account",
"goToAccounts": "Connected Accounts",
"linking": "Linking account...",
"linkTelegramWidget": "Sign in with Telegram to connect",
"linkingTelegram": "Connecting Telegram...",
"providers": {
"telegram": "Telegram",
"email": "Email",

View File

@@ -3051,6 +3051,8 @@
"unlinkError": "قطع اتصال ناموفق بود",
"goToAccounts": "حساب‌های متصل",
"linking": "در حال اتصال حساب...",
"linkTelegramWidget": "برای اتصال از طریق تلگرام وارد شوید",
"linkingTelegram": "در حال اتصال تلگرام...",
"providers": {
"telegram": "تلگرام",
"email": "ایمیل",

View File

@@ -4175,6 +4175,8 @@
"unlinkError": "Не удалось отвязать аккаунт",
"goToAccounts": "Привязанные аккаунты",
"linking": "Привязка аккаунта...",
"linkTelegramWidget": "Войдите через Telegram для привязки",
"linkingTelegram": "Привязка Telegram...",
"providers": {
"telegram": "Telegram",
"email": "Email",

View File

@@ -3050,6 +3050,8 @@
"unlinkError": "取消关联失败",
"goToAccounts": "关联账户",
"linking": "正在关联账户...",
"linkTelegramWidget": "通过 Telegram 登录以关联",
"linkingTelegram": "正在关联 Telegram...",
"providers": {
"telegram": "Telegram",
"email": "邮箱",