Do you know how I can synchronize my server's time so that TOTP generates right codes at the right time for my steam bot? Currently using node-steam-totp.
Thanks.
To generate a TOTP code synchronized with the server, you should first use node-steam-totp's getTimeOffset()
method. After retrieving the offset, you can go about making your TOTP codes using the optional timeOffset
parameter.
Here's an example to get you started:
totp.getTimeOffset(function(err, offset, latency) {
var authcode = totp.getAuthCode(secret, offset);
//do login stuff
});