mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 05:03:28 +08:00
Automatically handle time offset when enabling 2FA (fixes #98)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user