mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
When the Telegram OIDC widget fails to load (ad blockers, DNS, CSP), the deep link polling fallback caused an infinite page reload: 1. pollDeepLinkToken received 202 (pending) which axios treated as success 2. loginWithDeepLink stored undefined tokens with isAuthenticated=true 3. checkAdminStatus() fired with invalid token → 401 4. Response interceptor called safeRedirectToLogin() → page reload → loop Fixes: - pollDeepLinkToken: validateStatus rejects non-200 (202 now caught in poll loop) - AUTH_ENDPOINTS: add /cabinet/auth/deeplink/ and /cabinet/auth/login/auto - safeRedirectToLogin: guard against redirect when already on /login - loginWithDeepLink: validate response tokens before storing - setTokens: validate tokens in store method (protects AutoLogin, VerifyEmail, etc.)