Adam Posted March 27, 2019 Report 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
Adam Posted March 27, 2019 Author Report 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
Adam Posted March 27, 2019 Author Report 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
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.