iulian Posted Sunday at 02:26 PM Report Posted Sunday at 02:26 PM Hello. I'm starting to use this project to automate some trading. I'm using this example: https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/examples/storehouse-steam.js I added useAccessToken in the construct to retrieve CS2 trade offers. 15 days ago disabled and re-enabled my 2-factor authenticator to retrieve my shared_secret and identity_secret with the examples found in node-steamcommunity. I have my mobile authenticator back on my phone, btw. I'm able to log in and see my incoming offers with the trade offer manager and it works accepting 'gift' offers (empty on my side). However, when confirming the trade offers where I'm giving away an item, I get 'Invalid Authenticator'. I noticed a few things, so maybe something went wrong along the way. When I'm logging in, I need to copy-paste my Steam Guard Code to log in, even though I have the twoFactorCode option there. The generated SteamTotp.getAuthCode(sharedSecret) is different from what I see in my authenticator. I tried playing with time offsets, either by adding 1, -1, or leaving it at 0. SteamTotp.getTimeOffset usually retrieves a 0. I'm on MacOS if that matters. Quote
Dr. McKay Posted Monday at 03:08 PM Report Posted Monday at 03:08 PM On 1/12/2025 at 9:26 AM, iulian said: The generated SteamTotp.getAuthCode(sharedSecret) is different from what I see in my authenticator. Either your secret is wrong or your clock is wrong. If getTimeOffset returns 0, that means that your secret is wrong. Quote
iulian Posted Tuesday at 09:15 PM Author Report Posted Tuesday at 09:15 PM I figured that one out, I had to do some digging but it looks like shared secrets are generated when setting up the mobile authenticator. On a separate note, I'm using the script to accept gift offers, which works fine. But, after about 24 hours, it seems like the script is not responding or getting any new steam notifications. I have a feeling that the session isn't kept alive properly. I experienced something similar with SIH on Chrome when I was keeping a Steam tab open for long periods of time. Is there a way of solving this issue besides trying to re-login? Quote
Dr. McKay Posted Wednesday at 07:05 AM Report Posted Wednesday at 07:05 AM Yes, a new secret is generated when a mobile authenticator is set up. When logging in using steam-user, you need to refresh your web session periodically. Call webLogOn() to do so. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.