feat: open OAuth linking in external browser from Telegram Mini App

- Rewrite OAuthCallback.tsx to handle 3 modes: login, link-browser,
  and link-server (external browser without JWT)
- Add linkServerComplete API method (no JWT, auth via state token)
- Update ConnectedAccounts to use platform.openLink() in Mini App
- Add server-complete endpoint to AUTH_ENDPOINTS (skip Bearer token)
- Enable refetchOnWindowFocus for linked-providers query
- Add returnToTelegram/openTelegram i18n keys (ru, en, zh, fa)
This commit is contained in:
Fringg
2026-03-05 02:24:28 +03:00
parent 9b4a8512c2
commit 7c30a1eab6
8 changed files with 192 additions and 34 deletions

View File

@@ -76,6 +76,7 @@ const AUTH_ENDPOINTS = [
'/cabinet/auth/password/reset',
'/cabinet/auth/oauth/',
'/cabinet/auth/merge/',
'/cabinet/auth/account/link/server-complete',
];
function isAuthEndpoint(url: string | undefined): boolean {