• Aryan Noshirvnai's avatar
    Fix /auth/telegram/login to actually link to the caller's account · eac2c415
    Aryan Noshirvnai authored
    It was documented as an account-linking flow (attach a Telegram session to
    the already-logged-in user) but the code never changed to match - it still
    created/looked up a *separate* User row keyed by Telegram's own numeric
    user_id and issued that identity a fresh token pair, same as the old
    Telegram-is-the-login design it was supposed to replace. Silently
    pointless: nothing actually got linked to whoever was logged in.
    
    Now requires an authenticated caller and attaches telegram_session_string
    + phone_number directly to current_user, no new tokens issued (the caller
    already has valid ones). Returns 409 if that Telegram account is already
    linked to a different Stax user. Found and fixed while helping the user
    actually test the chat-scanning feature against their real account.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    eac2c415
Name
Last commit
Last update
..
api Loading commit data...
core Loading commit data...
services Loading commit data...
telegram_bot Loading commit data...
telegram_worker Loading commit data...