Skip to content

Fix empty raw data in steam provider#518

Closed
leobrines wants to merge 1 commit into
markbates:masterfrom
leobrines:fix-empty-raw-data-steam
Closed

Fix empty raw data in steam provider#518
leobrines wants to merge 1 commit into
markbates:masterfrom
leobrines:fix-empty-raw-data-steam

Conversation

@leobrines
Copy link
Copy Markdown

@leobrines leobrines commented Aug 2, 2023

Fixed empty raw data in user response when you use Steam provider.

@leobrines leobrines force-pushed the fix-empty-raw-data-steam branch from 7ea1ff2 to 56dd586 Compare August 4, 2023 13:10
@yabanci
Copy link
Copy Markdown

yabanci commented May 17, 2026

Hi @leobrines — hope you don't mind, I picked this up to try to land it. The gap you identified is still present on master 2+ years later, so the underlying fix is still needed.

The follow-up PR is #644. Two changes vs. your original patch, with reasoning:

  1. Decode the body once and unmarshal the player into both the typed struct and u.RawData instead of marshalling the typed struct back to JSON and decoding that into the map. Your approach worked correctly but it made RawData a strict duplicate of the six typed fields (steamid, personaname, realname, avatarfull, loccountrycode, locstatecode) — so callers still couldn't reach communityvisibilitystate, timecreated, primaryclanid, profileurl, etc. The new approach exposes the full Steam player payload, which is what RawData does in every other goth provider (auth0, discord, etc.).

  2. Expanded the test fixture beyond the six fields you used to a realistic Steam player payload, and added RawData assertions for the no-slot fields. This way a future refactor can't silently shrink the response again — which is, I suspect, exactly the kind of latent regression that left this PR sitting for two years.

Your httpTestTransport indirection and the testUserSummaryBody structure are preserved as-is, those were already the right design. Credit to you for the original analysis and the test infrastructure — both still load-bearing here.

Suggest closing this in favour of #644 once it lands.

@leobrines
Copy link
Copy Markdown
Author

closed in favor of @yabanci changes in #644

@leobrines leobrines closed this May 19, 2026
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.

2 participants