kast0l Posted February 20 Report Posted February 20 identitySecret in this format JGhCjFThpoOCuCH4...=,time in this format is 1708401621,data about identitySecret is taken from maFille and they are correct, I checked, since trades are successfully confirmed through SDA,confKey in this format DAgRR7dVxGjC9axkJaf3M...=,offerid also match, but I don't understand why this error occurs Error: Invalid authenticator here is part of the code that confirms trades and calls this function async function confirmTradeOffer(community, offer, identitySecret) { const time = SteamTotp.time(); const confKey = SteamTotp.getConfirmationKey(identitySecret, time, 'allow'); console.log(`Подтверждение трейда с следующими данными:`); console.log(`- ID трейда: ${offer.id}`); console.log(`- Время (Unix Timestamp): ${time}`); console.log(`- Ключ подтверждения: ${confKey}`); console.log(`- IdentitySecret: ${identitySecret}`); return new Promise((resolve, reject) => { community.acceptConfirmationForObject(offer.id, confKey, (err) => { if (err) { console.error(`Ошибка подтверждения трейда ID ${offer.id}: ${err}`); reject(`Ошибка подтверждения трейда: ${err}`); } else { console.log(`Трейд ID ${offer.id} успешно подтвержден.`); resolve('Трейд подтвержден успешно.'); } }); }); } const confirmResult = await confirmTradeOffer(community, offer, account.identitySecret); console.log(confirmResult); break; Quote
kast0l Posted February 20 Author Report Posted February 20 from maFile I took the key after "identity_secret": Quote
Nickers Posted February 20 Report Posted February 20 (edited) I started getting same error when using "acceptAllConfirmations()" for few week now. I'm from Russia as well so it might be something with DNS/network/certificates and such. Here is full error: Quote "It looks like your Steam Guard Mobile Authenticator is providing incorrect Steam Guard codes. This could be caused by an inaccurate clock or bad timezone settings on your device. If your time settings are correct, it could be that a different device has been set up to provide the Steam Guard codes for your account, which means the authenticator on this device is no longer valid." Common fixes to this error are: Wrong time / time zone Switching to English language None of that tracks or helped. Error only occuring on my personal PC (same code works on the linux server in Europe with same TZ settings) Also SDA still works so it must be doing something differently. Edited February 20 by Nickers kast0l 1 Quote
kast0l Posted February 20 Author Report Posted February 20 Is there an error in creating confKey? Quote
kast0l Posted February 21 Author Report Posted February 21 (edited) @NickersAny ideas why this works on a server in Europe and doesn’t work on a personal PC in Russia? I’ve just tried everything.And when did this error start appearing? Edited February 21 by kast0l Quote
Nickers Posted February 21 Report Posted February 21 (edited) I first noticed back in January 30, when I tried to debug my project, but it could've started way earlier, so I don't know. I heard we had a problem with network certificates lately, but I don't know. SDA sends same types of requests and it seems to work fine there, but something might be different. Maybe totp somehow uses System Locales which results in error. Might be something else entirely. Edited February 21 by Nickers Quote
kast0l Posted February 22 Author Report Posted February 22 @NickersI found something similar to sda, but which works through node.js, the generation of confirmation codes occurs through steam-totp, I added an account to check if the confirmation works there and the confirmation worked, maybe you can take a look you'll find something https://github.com/ost056/SteamAuthTool/blob/main/components/master/steam/confirmation.js Quote
kast0l Posted February 25 Author Report Posted February 25 @NickersI figured out what the problem was, I needed to look at the library more carefully, for your case I tested this code and everything was successfully confirmed for me async function confirmTradeOffers(community, identitySecret) { const time = SteamTotp.time(); const confKey = SteamTotp.getConfirmationKey(identitySecret, time, 'conf'); const allowKey = SteamTotp.getConfirmationKey(identitySecret, time, 'allow'); return new Promise((resolve, reject) => { community.acceptAllConfirmations(time, confKey, allowKey, (err, confs) => { if (err) { console.error(`Ошибка при подтверждении всех трейдов: ${err}`); reject(`Ошибка подтверждения: ${err}`); } else { console.log(`Все трейды успешно подтверждены. Подтверждено трейдов: ${confs.length}`); resolve(`Трейды подтверждены успешно. Подтверждено трейдов: ${confs.length}`); } }); }); } await confirmTradeOffers(community, account.identity_secret); Quote
Nickers Posted February 27 Report Posted February 27 (edited) Damn, I don't think I've changed my code since it last worked... Edited February 27 by Nickers 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.