claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.33k stars 90 forks source link

Error: Invalid character found #68

Closed ahobbit closed 3 years ago

ahobbit commented 3 years ago

While using a TOTP token I get this error, which doesn't occur when I don't use the 2FA:

[2020-12-29 11:11:36.842 +0100] ERROR (39 on 322de1dc209d): Invalid character found: 9, at async Promise.all (index 0), TypeError: Invalid character found: 9, at Function.fromB32 (/usr/app/node_modules/otpauth/dist/webpack:/OTPAuth/src/secret.js:36:41), at Object.toBuf (/usr/app/node_modules/otpauth/dist/webpack:/OTPAuth/src/utils.js:156:27), at new TOTP (/usr/app/node_modules/otpauth/dist/webpack:/OTPAuth/src/otp.js:219:13), at Login.loginMFA (/usr/app/src/login.ts:61:18), at processTicksAndRejections (internal/process/task_queues.js:97:5), at Login.login (/usr/app/src/login.ts:133:11), at Login.login (/usr/app/src/login.ts:128:11), at Login.fullLogin (/usr/app/src/login.ts:205:7), at /usr/app/src/index.ts:20:7

claabs commented 3 years ago

Your token should be a 52 character base32 string. Base32 is A-Z2-7, so 9 isn't a valid character.

Check the docs here for setting up your TOTP secret: https://github.com/claabs/epicgames-freegames-node#two-factor-login