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
Post a Comment