Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 1. Full/Steam Desktop Authenticator/App.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<system.net>
<settings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CefReturnValue IRequestHandler.OnBeforeResourceLoad(IWebBrowser browserControl,
// Check if the session is expired
if (request.Url == "steammobile://lostauth")
{
MessageBox.Show("Failed to load confirmations.\nTry using \"Force session refresh\" under the Selected Account menu.\nIf that doesn't work use the \"Login again\" option.", "Confirmations", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Failed to load confirmations.\nUse the \"Login again\" option under the \"Selected Account\" menu.\nIf that doesn't work use the \"Login again\" option.", "Confirmations", MessageBoxButtons.OK, MessageBoxIcon.Error);
return CefReturnValue.Cancel;
}

Expand Down
4 changes: 0 additions & 4 deletions 1. Full/Steam Desktop Authenticator/ConfirmationFormList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ private async void loadConfirmations(bool retry = false)
if (ConfirmationType == "Trade") { TradeWith += " offer ID: " + Confirmations[i].ID; }
else if (ConfirmationType == "Market") { TradeWith += " ID: " + Confirmations[i].ID; }

TradeWith = Confirmations[i].OtherUserName;
if (ConfirmationType == "Trade") { TradeWith = "Trade: " + TradeWith; }
else if(ConfirmationType == "Market"){ TradeWith = "Sell: " + TradeWith; }

// for DEBUG
//using (System.IO.TextWriter writer = System.IO.File.CreateText(System.AppDomain.CurrentDomain.BaseDirectory + @"\- debug pg.txt")) { writer.Write(Confirmations[i].AllData); }

Expand Down
2 changes: 1 addition & 1 deletion 1. Full/Steam Desktop Authenticator/ConfirmationFormWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ConfirmationFormWeb(SteamGuardAccount steamAccount)
settings.PersistSessionCookies = false;
settings.Locale = "en-US";
settings.UserAgent = "Mozilla/5.0 (Linux; Android 6.0; Nexus 6P Build/XXXXX; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/47.0.2526.68 Mobile Safari/537.36";
steamCookies = String.Format("mobileClientVersion=0 (2.1.3); mobileClient=android; steamid={0}; steamLogin={1}; steamLoginSecure={2}; Steam_Language=english; dob=;", steamAccount.Session.SteamID.ToString(), steamAccount.Session.SteamLogin, steamAccount.Session.SteamLoginSecure);
steamCookies = String.Format("mobileClientVersion=0 (2.1.3); mobileClient=android; steamid={0}; steamLoginSecure={1}; Steam_Language=english; dob=;", steamAccount.Session.SteamID.ToString(), steamAccount.Session.SteamLoginSecure);

if (!Cef.IsInitialized)
{
Expand Down
10 changes: 0 additions & 10 deletions 1. Full/Steam Desktop Authenticator/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 10 additions & 60 deletions 1. Full/Steam Desktop Authenticator/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,26 +408,6 @@ private void menuDeactivateAuthenticator_Click(object sender, EventArgs e)
else { MessageBox.Show("Steam Guard was not removed. No action was taken."); }
}

private async void menuRefreshSession_Click(object sender, EventArgs e)
{
int RefreshSession_InfoStatus_ = 1;

bool status = false;
try { status = await currentAccount.RefreshSessionAsync(); } catch (Exception) { }

if (status == true)
{
MessageBox.Show("Your session has been refreshed.", "Session refresh", MessageBoxButtons.OK, MessageBoxIcon.Information);
manifest.SaveAccount(currentAccount, manifest.Encrypted, passKey);
}
else
{
MessageBox.Show("Failed to refresh your session.\nTry again soon.", "Session refresh", MessageBoxButtons.OK, MessageBoxIcon.Error);
RefreshSession_InfoStatus_ = 0;
}
RefreshSession_InfoStatus = RefreshSession_InfoStatus_;
}

private void helpToolStripMenuItem_Click(object sender, EventArgs e)
{
string FolderPath = Manifest.GetExecutableDir();
Expand Down Expand Up @@ -637,7 +617,7 @@ private async Task AllAcc_UpdateSession(SteamGuardAccount account)
Task.Delay(Settings_ConfirmationCheckAllAcc_RefreshSessionDellay).Wait();

int AllAcc_RefreshSession_InfoStatus_ = 1;
try { await account.RefreshSessionAsync(); } catch (Exception) { AllAcc_RefreshSession_InfoStatus_ = 0; }
try { PromptRefreshLogin(account); } catch (Exception) { AllAcc_RefreshSession_InfoStatus_ = 0; }

AllAcc_RefreshSession_InfoStatus = AllAcc_RefreshSession_InfoStatus_;
}
Expand Down Expand Up @@ -937,9 +917,9 @@ private async void Settings_PopupNewConf_Tick(object sender, EventArgs e)
lblStatus.Text = "Failed > Refreshing session";
Program.ConsoleForm_Update.SetConsoleText("Check Confirmations > Failed > Refreshing session", "ConsoleStatus_ReturnFaildFixIt");

await currentAccount.RefreshSessionAsync(); //Don't save it to the HDD, of course. We'd need their encryption passkey again.
lblStatus.Text = "Refreshing session > Done";
Program.ConsoleForm_Update.SetConsoleText("Refreshing session > Done", "ConsoleStatus_Return");
// Prompt to relogin
PromptRefreshLogin(acc);
break;
}
catch (SteamGuardAccount.WGTokenExpiredException)
{
Expand Down Expand Up @@ -1019,15 +999,10 @@ private async void Settings_PopupNewConf_Tick(object sender, EventArgs e)
if (conf.ConfType == Confirmation.ConfirmationType.MarketSellTransaction) { ConfirmationType = "Market"; }
else if (conf.ConfType == Confirmation.ConfirmationType.Trade) { ConfirmationType = "Trade"; }

// OLD CODE > used when I didn't have user name
TradeWith = ConfirmationType;
if (ConfirmationType == "Trade") { TradeWith += " offer ID: " + conf.ID; }
else if (ConfirmationType == "Market") { TradeWith += " ID: " + conf.ID; }

// NEW CODE
if (ConfirmationType == "Trade") { TradeWith = "Trade: " + conf.OtherUserName; }
else if (ConfirmationType == "Market") { TradeWith = "Sell: " + conf.OtherUserName; }

Program.ConsoleForm_Update.SetConsoleText("Confirmation Detected " + acc.AccountName + " > " + TradeWith + " > ID: " + conf.ID.ToString(), "ConsoleStatus_Info");

//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
Expand Down Expand Up @@ -1127,9 +1102,9 @@ private async void Settings_PopupNewConf_Tick(object sender, EventArgs e)
lblStatus.Text = "Failed > Refreshing session";
Program.ConsoleForm_Update.SetConsoleText("Check Confirmations > Failed > Refreshing session", "ConsoleStatus_ReturnFaildFixIt");

await currentAccount.RefreshSessionAsync(); //Don't save it to the HDD, of course. We'd need their encryption passkey again.
lblStatus.Text = "Refreshing session > Done";
Program.ConsoleForm_Update.SetConsoleText("Refreshing session > Done", "ConsoleStatus_Return");
// Prompt to relogin
PromptRefreshLogin(acc);
break;
}
catch (SteamGuardAccount.WGTokenExpiredException)
{
Expand Down Expand Up @@ -1162,31 +1137,6 @@ private async void Settings_PopupNewConf_Tick(object sender, EventArgs e)

// Other methods

/// <summary>
/// Refresh this account's session data using their OAuth Token
/// </summary>
/// <param name="account">The account to refresh</param>
/// <param name="attemptRefreshLogin">Whether or not to prompt the user to re-login if their OAuth token is expired.</param>
/// <returns></returns>
private async Task<bool> RefreshAccountSession(SteamGuardAccount account, bool attemptRefreshLogin = true)
{
if (account == null) return false;

try
{
bool refreshed = await account.RefreshSessionAsync();
return refreshed; //No exception thrown means that we either successfully refreshed the session or there was a different issue preventing us from doing so.
}
catch (SteamGuardAccount.WGTokenExpiredException)
{
if (!attemptRefreshLogin) return false;

PromptRefreshLogin(account);

return await RefreshAccountSession(account, false);
}
}

/// <summary>
/// Display a login form to the user to refresh their OAuth Token
/// </summary>
Expand Down Expand Up @@ -1329,7 +1279,7 @@ private void loadAccountsList()
listAccounts.SelectedIndex = 0;
trayAccountList.SelectedIndex = 0;
}
menuDeactivateAuthenticator.Enabled = btnTradeConfirmations.Enabled = btnTradeConfirmationsList.Enabled = menuLoginAgain.Enabled = menuRefreshSession.Enabled = btn_forceSessionRefreshForAllAccounts_ToolStripMenuItem.Enabled = menuRemoveAccountFromManifest.Enabled = menuDeactivateAuthenticator.Enabled = allAccounts.Length > 0;
menuDeactivateAuthenticator.Enabled = btnTradeConfirmations.Enabled = btnTradeConfirmationsList.Enabled = menuLoginAgain.Enabled = btn_forceSessionRefreshForAllAccounts_ToolStripMenuItem.Enabled = menuRemoveAccountFromManifest.Enabled = menuDeactivateAuthenticator.Enabled = allAccounts.Length > 0;

}

Expand All @@ -1350,7 +1300,7 @@ private async Task UpdateCurrentSession_ForBg(SteamGuardAccount account, string
Program.ConsoleForm_Update.SetConsoleText("Auto check for Confirmations > " + account.AccountName + " > Refreshing session...", "ConsoleStatus_Task");
try
{
await account.RefreshSessionAsync();
PromptRefreshLogin(account);
if (updatedSessions.Contains(account.AccountName) == false) { updatedSessions.Add(account.AccountName); }
Program.ConsoleForm_Update.SetConsoleText("Auto check for Confirmations > " + account.AccountName + " > Refreshing session > Done", "ConsoleStatus_Return");
}
Expand Down Expand Up @@ -1381,7 +1331,7 @@ private async Task UpdateSession(SteamGuardAccount account)

try
{
await currentAccount.RefreshSessionAsync();
PromptRefreshLogin(currentAccount);
if (updatedSessions.Contains(account.AccountName) == false) { updatedSessions.Add(account.AccountName); }
lblStatus.Text = "Refreshing session > Done";
Program.ConsoleForm_Update.SetConsoleText("Refreshing session > Done", "ConsoleStatus_Return");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.9.1")]
[assembly: AssemblyFileVersion("1.0.9.1")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Steam_Desktop_Authenticator_47</RootNamespace>
<AssemblyName>Steam Desktop Authenticator 47</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
Expand Down Expand Up @@ -115,8 +115,8 @@
<HintPath>packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
9 changes: 0 additions & 9 deletions 1. Full/Steam Desktop Authenticator/TradePopupForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,8 @@ private async void btnAccept_Click(object sender, EventArgs e)
else if (ConfirmationType == "Market") { label_action.Text = "Sell:"; }

string TradeWith = "";
// OLD CODE > used when I didn't have user name
if (ConfirmationType == "Trade") { TradeWith += "ID: " + confirms[CurrentConfirmationNo].ID; }
else if (ConfirmationType == "Market") { TradeWith += "ID: " + confirms[CurrentConfirmationNo].ID; }
// NEW CODE
TradeWith = confirms[CurrentConfirmationNo].OtherUserName;



Expand Down Expand Up @@ -172,11 +169,8 @@ private async void btnDeny_Click(object sender, EventArgs e)
else if (ConfirmationType == "Market") { label_action.Text = "Sell:"; }

string TradeWith = "";
// OLD CODE > used when I didn't have user name
if (ConfirmationType == "Trade") { TradeWith += "ID: " + confirms[CurrentConfirmationNo].ID; }
else if (ConfirmationType == "Market") { TradeWith += "ID: " + confirms[CurrentConfirmationNo].ID; }
// NEW CODE
TradeWith = confirms[CurrentConfirmationNo].OtherUserName;


Program.ConsoleForm_Update.SetConsoleText("POPUP Confirmation: Denying... "+ TradeWith, "ConsoleStatus_Confirmed");
Expand Down Expand Up @@ -251,11 +245,8 @@ private void Reset(string MoveDirection = "front")
else if (ConfirmationType == "Market") { label_action.Text = "Sell:"; }

string TradeWith = "";
// OLD CODE > used when I didn't have user name
if (ConfirmationType == "Trade") { TradeWith += "ID: " + confirms[CurrentConfirmationNo].ID; }
else if (ConfirmationType == "Market") { TradeWith += "ID: " + confirms[CurrentConfirmationNo].ID; }
// NEW CODE
TradeWith = confirms[CurrentConfirmationNo].OtherUserName;



Expand Down
2 changes: 1 addition & 1 deletion 1. Full/Steam Desktop Authenticator/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<package id="CefSharp.Common" version="63.0.3" targetFramework="net462" />
<package id="CefSharp.WinForms" version="63.0.3" targetFramework="net462" />
<package id="CommandLineParser" version="1.9.71" targetFramework="net452" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
</packages>
2 changes: 1 addition & 1 deletion 2. Mini/Steam Desktop Authenticator/App.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<system.net>
<settings>
Expand Down
4 changes: 0 additions & 4 deletions 2. Mini/Steam Desktop Authenticator/ConfirmationFormList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ private async void loadConfirmations(bool retry = false)
if (ConfirmationType == "Trade") { TradeWith += " offer ID: " + Confirmations[i].ID; }
else if (ConfirmationType == "Market") { TradeWith += " ID: " + Confirmations[i].ID; }

TradeWith = Confirmations[i].OtherUserName;
if (ConfirmationType == "Trade") { TradeWith = "Trade: " + TradeWith; }
else if(ConfirmationType == "Market"){ TradeWith = "Sell: " + TradeWith; }

// for DEBUG
//using (System.IO.TextWriter writer = System.IO.File.CreateText(System.AppDomain.CurrentDomain.BaseDirectory + @"\- debug pg.txt")) { writer.Write(Confirmations[i].AllData); }

Expand Down
Loading