Jump to content
McKay Development

Error identity secret upon confirmation of trade?


kast0l

Recommended Posts

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;
Link to comment
Share on other sites

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 by Nickers
Link to comment
Share on other sites

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 by Nickers
Link to comment
Share on other sites

@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

Link to comment
Share on other sites

@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);
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...