node.js - Synchronize device time for TOTP function -


do know how can synchronize server's time totp generates right codes @ right time steam bot? using node-steam-totp.

thanks.

to generate totp code synchronized server, should first use node-steam-totp's gettimeoffset() method. after retrieving offset, can go making totp codes using optional timeoffset parameter.

here's example started:

totp.gettimeoffset(function(err, offset, latency) {     var authcode = totp.getauthcode(secret, offset);      //do login stuff }); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -