calendulish / steam-tools-ng

Useful tools for Steam (Windows/Linux)
GNU General Public License v3.0
62 stars 4 forks source link

[BUG] Minor desync in steamguard module #114

Closed calendulish closed 2 months ago

calendulish commented 2 months ago

Describe the bug There's a minor desync in steamguard module when generating codes after a "full relogin". Codes are automatically fixed on the second try.

To Reproduce Steps to reproduce the behavior:

  1. do a full login
  2. wait steam server expire the login
  3. generate codes again (it will do a full relogin automatically)
  4. the first code will be wrong. next ones are okay.

Desktop (please complete the following information):

Additional context Further investigation is needed to determine if the cause is the server time desync (we still need to check the server time?!) or the delay between api execution and the generation of the codes (aren't we already adding the function time on stlib?!).

calendulish commented 2 months ago

The UpdateAuthSessionWithSteamGuardCode accepts the code on relogin process, with SteamGameServer reusing the same code later (wrong already). Apparently the wrong code expires at 1s or less before the call. Is it caused by the server time cache mechanism?