node-steam-user
node-steam-user copied to clipboard
Instantly getting disconnected with right credentials
Hello,
I tried to logOn to a Steam account with this code:
var sharedSecret = 'XXXXXX';
steamUser.logOn({
account_name: 'username',
password: 'password',
twoFactorCode: SteamTotp.generateAuthCode('sharedSecret')
});
When I am trying to run it with node I am getting this as reply:
events.js:182
throw er; // Unhandled 'error' event
^
Error: Disconnected
at SteamClient._disconnected (/projects/node/SteamTradeBot/node_modules/steam/lib/steam_client.js:186:24)
at emitOne (events.js:115:13)
at Connection.emit (events.js:210:7)
at TCP._handle.close [as _onclose] (net.js:549:12)
I don't know how I should fix this error. Thank you in Advance!
Regards, Marco
P.S. I am getting the right authCode with SteamTotp if I do console.log(sharedSecret)
Change account_name to accountName?
I just found the mistake: The error was thrown by something later on in my code. @Rob-- Thank you for your answer anyway :)