Automatically handle time offset when enabling 2FA (fixes #98)

This commit is contained in:
Alexander Corn 2016-04-02 16:14:34 -04:00
parent ddf0221489
commit 839d8b51e3

View File

@ -61,7 +61,15 @@ SteamCommunity.prototype.finalizeTwoFactor = function(secret, activationCode, ca
return;
}
finalize(token);
SteamTotp.getTimeOffset(function(err, offset, latency) {
if (err) {
callback(err);
return;
}
diff = offset;
finalize(token);
});
});
function finalize(token) {