• 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
alembic Loading commit data...
deploy Loading commit data...
scripts Loading commit data...
src Loading commit data...
tests Loading commit data...
.env.example Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
alembic.ini Loading commit data...
docker-compose.yml Loading commit data...
requirements-remix.txt Loading commit data...
requirements.txt Loading commit data...
setup.sh Loading commit data...