added an automatic retry if LoginResult.Need2FA returned and account has shared secret
This commit is contained in:
parent
fcc59a32e9
commit
6c190f0918
1 changed files with 8 additions and 0 deletions
|
@ -491,6 +491,14 @@ namespace SteamGuard
|
|||
UserLogin login = new UserLogin(username, password);
|
||||
Console.Write($"Logging in {username}... ");
|
||||
LoginResult loginResult = login.DoLogin();
|
||||
if (loginResult == LoginResult.Need2FA && !string.IsNullOrEmpty(account.SharedSecret))
|
||||
{
|
||||
if (Verbose) Console.WriteLine(loginResult);
|
||||
TimeAligner.AlignTime();
|
||||
login.TwoFactorCode = account.GenerateSteamGuardCode();
|
||||
if (Verbose) Console.Write($"Logging in {username}... ");
|
||||
loginResult = login.DoLogin();
|
||||
}
|
||||
Console.WriteLine(loginResult);
|
||||
|
||||
if (account.RefreshSession())
|
||||
|
|
Loading…
Reference in a new issue