added re-login on refresh session fail
This commit is contained in:
parent
c53404ba94
commit
fcc59a32e9
1 changed files with 21 additions and 1 deletions
22
Program.cs
22
Program.cs
|
@ -481,7 +481,27 @@ namespace SteamGuard
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine("Failed to refresh session");
|
if (Verbose) Console.WriteLine("Failed to refresh session");
|
||||||
|
Console.WriteLine("Your Steam credentials have expired. For trade and market confirmations to work properly, please login again.");
|
||||||
|
string username = account.AccountName;
|
||||||
|
Console.WriteLine($"Username: {username}");
|
||||||
|
Console.Write("Password: ");
|
||||||
|
var password = Console.ReadLine();
|
||||||
|
|
||||||
|
UserLogin login = new UserLogin(username, password);
|
||||||
|
Console.Write($"Logging in {username}... ");
|
||||||
|
LoginResult loginResult = login.DoLogin();
|
||||||
|
Console.WriteLine(loginResult);
|
||||||
|
|
||||||
|
if (account.RefreshSession())
|
||||||
|
{
|
||||||
|
if (Verbose) Console.WriteLine("Session refreshed");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to refresh session");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Console.WriteLine("Retrieving trade confirmations...");
|
Console.WriteLine("Retrieving trade confirmations...");
|
||||||
var trades = account.FetchConfirmations();
|
var trades = account.FetchConfirmations();
|
||||||
|
|
Loading…
Reference in a new issue