Jump to content
McKay Development

Stuck in steamGuard event.


Recommended Posts

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");
                throw new Error("To many consecutive wrong GUARD CODE")
            try {
                const code = await this.generateAuthCode();
            } catch (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);
Link to comment
Share on other sites

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.

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.

  • Create New...