AshIgorash Posted July 6 Report Posted July 6 On steamGuard event I am using an async method to get authCode and it just looping again and again here to get a new one with lastCodeWrong = true. If using sync method to get code then everything is works well. this.steamClient.on('steamGuard', async (domain, callback, lastCodeWrong) => { logger.info("Need code"); console.log(lastCodeWrong); if(lastCodeWrong){ throw new Error("To many consecutive wrong GUARD CODE") } try { const code = await this.generateAuthCode(); callback(code); } catch (e) { console.log(e); } }); private async generateAuthCode(): Promise<string> { let offset: number | undefined; try { offset = await this.getTimeOffset; console.log('Offset:' + offset) } catch (err) { // ignore error } return SteamTotp.generateAuthCode(this.auth, offset); } Quote
Dr. McKay Posted July 6 Report Posted July 6 I think you're missing some parens after this.getTimeOffset 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.