Commit 0414a226 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Handle Telegram two-step verification (SESSION_PASSWORD_NEEDED) during linking

Accounts with a Telegram cloud password enabled couldn't link at all -
sign_in() raised SessionPasswordNeeded and the endpoint surfaced it as
a generic 400. /auth/telegram/login now returns 412 in that case (not
401, so apiFetch's access-token-refresh retry doesn't swallow it), and
a new /auth/telegram/password endpoint finishes the same in-progress
Pyrogram auth session with the password, via a shared _link_telegram_session
helper so both paths attach to the caller identically.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent eac2c415
Pipeline #1105 passed with stage
in 5 minutes and 15 seconds