Adam Posted March 27, 2019 Report Share Posted March 27, 2019 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? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 27, 2019 Report Share Posted March 27, 2019 What is the error? Quote Link to comment Share on other sites More sharing options...
Adam Posted March 27, 2019 Author Report Share Posted March 27, 2019 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. Quote Link to comment Share on other sites More sharing options...
Adam Posted March 27, 2019 Author Report Share Posted March 27, 2019 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.