Jump to content
McKay Development

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

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...