Skip to content

fix(accounts): don't crash Steam login when several users share a steamid - #770

Merged
strycore merged 1 commit into
masterfrom
fix/steam-login-duplicate-steamid
Oct 9, 2026
Merged

strycore merged 1 commit into
masterfrom
fix/steam-login-duplicate-steamid

Conversation

@strycore

@strycore strycore commented Oct 9, 2026

Copy link
Copy Markdown
Member

Production error report on 2026-10-06:

MultipleObjectsReturned at /accounts/steam/callback/: get() returned more than one User -- it returned more than 20!
(from accounts/allauth_adapter.py, pre_social_login)

LutrisSocialAccountAdapter.pre_social_login matches Steam logins to existing users with User.objects.get(steamid=uid). When several accounts carry the same steamid, the Steam callback returns a 500. This PR handles MultipleObjectsReturned the same way the email branch already does: log a warning and skip auto-connect.

Note: more than 20 accounts share the SteamID from that report, which may be worth a look for spam or multi-accounting.

Tests: new TestSteamSocialLogin covers connecting a single matching user and handling a duplicate steamid. The duplicate test errors without the fix. The full suite passes (168 tests, CI settings), as do ruff check and ruff format --check.

🤖 Generated with Claude Code

…amid

pre_social_login looked up the user with User.objects.get(steamid=...),
which raised MultipleObjectsReturned on /accounts/steam/callback/ when
more than one account carries the same steamid. Skip auto-connecting in
that case, as is already done for duplicate emails.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@strycore
strycore merged commit e1cf98c into master Oct 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant