Jump to content


Wrong codes being generated by node-steam-totp module

node-steam-totp wrong codes

  • Please log in to reply
1 reply to this topic

#1 marcon



  • Member
  • Pip
  • 1 posts

Posted 03 October 2018 - 07:31 AM

Hello. I have trouble with node-steam-totp module to work properly for me. The code I use:

var SteamTotp = require('steam-totp');
var secret = 'secret_stuff';

setInterval(function () {
    console.log('Code #1 = ' + SteamTotp.generateAuthCode(secret));

    SteamTotp.generateAuthCode(secret, function (error, code, offset, latency) {
        console.log('Code #2 = ' + code);
}, 5000);

I'm using secret_1 value from WinAuth. Codes are generated perfectly fine by WinAuth but both codes generated by code above are invalid. The secret I'm using is correct (I removed it from code snippet for security reasons). Do i miss something or is there something wrong with the module itself? Both node js code and WinAuth are running on the same machine and I'm using latest version of node-steam-totp. I'm happy to provide additional info if needed. Thanks in advance for any help.

#2 Dr. McKay

Dr. McKay


  • Administrator
  • 2,074 posts

Posted 03 October 2018 - 11:27 PM

Use shared_secret, not secret_1.

Also tagged with one or more of these keywords: Question, node-steam-totp, wrong codes

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users