quer / the-steam-awards

Steam multi account module/event (get updates when event for steam)
96 stars 13 forks source link

Error during connection try #13

Closed githubshiel closed 3 years ago

githubshiel commented 4 years ago

scr1 I dont know where to find "sharedSecret:" located in config.js My account don't have 2FA auth. Only email code, so I left shred secret as empty. scr2 Can someone help? Thanks in advance.

quer commented 4 years ago

Hey! it a thing whit node steam. but i think you can find what you need here: https://github.com/seishun/node-steam/issues/344

quer commented 4 years ago

or maby: http://www.natewillard.com/blog/node-steam/steam/steam-guard/javascript/node/2015/09/09/node-Steamguard/

where you need to

steamUser.on('updateMachineAuth', function(sentry, callback) {
  console.log('writing to file sentry');
  fs.writeFileSync('sentry', sentry.bytes);
  callback({ sha_file: getSHA1(sentry.bytes) });
});
function getSHA1(bytes) {
  var shasum = crypto.createHash('sha1');
  shasum.end(bytes);
  return shasum.read();
}

and edit part of the code to this:

steamClient.on('connected', function() {
  steamUser.logOn({
    account_name: '[redacted]',
    password: '[redacted]',
    // un-comment this when providing secondary auth-code from email
    // auth_code: '[redacted]', 
    sha_sentryfile: getSHA1(fs.readFileSync('sentry'))
  });
});

it a bit hard to eksplain, but hope the like on to eksplains it.

githubshiel commented 4 years ago

Sorry Sir, I'm not dealing so good with coding :/ I have tried to change some code, like you wrote above, but without success. Is there any other way to fix it?