mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-03-24 06:00:07 +08:00
Automatically handle time offset when enabling 2FA (fixes #98)
This commit is contained in:
parent
ddf0221489
commit
839d8b51e3
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user