Jump to content


Photo

loggedOn not catching

node.js node-steam-tradeoffer-manager

Best Answer Adam , 27 March 2019 - 04:00 AM

Well I worked out the issue. 

 

req.body.tfa was never passed in, and because VScode is so helpful and doesn't show inputs, the program requested I reenter the two-factor-authentication.

 

Always check your variable names kids.

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 Adam

Adam

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 26 March 2019 - 08:58 PM

Hi,

I have the following code and am trying to check whether the app is able to log into steam or not. 

For whatever reason, the error is caught but the loggOn event never occurs

 

Any ideas how to fix this?

 

const client = new SteamUser();
const logOnOptions = {
accountName: req.body.username,
password: req.body.password,
twoFactorCode: req.body.tfa

};

 
client.logOn(logOnOptions);

client.on('loggedOn', () => {
console.log('Hi!');
});

client.on('error', () => {
console.log('This is one dumb human')
});

 

Any thoughts?



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,042 posts

Posted 26 March 2019 - 09:26 PM

What is the error?



#3 Adam

Adam

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 27 March 2019 - 03:48 AM

There is no error. Simply nothing happens.

 

If the user enters their incorrect details, the error code will run. If the user enters correct details however, nothing happens.



#4 Adam

Adam

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 27 March 2019 - 04:00 AM   Best Answer

Well I worked out the issue. 

 

req.body.tfa was never passed in, and because VScode is so helpful and doesn't show inputs, the program requested I reenter the two-factor-authentication.

 

Always check your variable names kids.







Also tagged with one or more of these keywords: node.js, node-steam-tradeoffer-manager

4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users