diff --git a/NebulaAuth.sln b/NebulaAuth.sln index 7b38f52..6a7e1ce 100644 --- a/NebulaAuth.sln +++ b/NebulaAuth.sln @@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "changelog", "changelog", "{ changelog\1.4.7.html = changelog\1.4.7.html changelog\1.4.8.html = changelog\1.4.8.html changelog\1.4.9.html = changelog\1.4.9.html + changelog\1.5.0.html = changelog\1.5.0.html EndProjectSection EndProject Global diff --git a/NebulaAuth/Model/MaClient.cs b/NebulaAuth/Model/MaClient.cs index 005531d..15b08c7 100644 --- a/NebulaAuth/Model/MaClient.cs +++ b/NebulaAuth/Model/MaClient.cs @@ -95,6 +95,7 @@ public static class MaClient Storage.UpdateMafile(mafile); } + public static async Task RefreshSession(Mafile mafile) { ValidateMafile(mafile, true); @@ -107,6 +108,7 @@ public static class MaClient mafile.SessionData.SetMobileToken(newToken); } + //RETHINK: Do we need this? Mobile token is enough var communityToken = mafile.SessionData!.GetToken(SteamDomain.Community); if (communityToken == null || communityToken.Value.IsExpired) { @@ -114,7 +116,7 @@ public static class MaClient var newToken = SteamTokenHelper.Parse(communityTokenString); mafile.SessionData.SetToken(SteamDomain.Community, newToken); } - + Storage.UpdateMafile(mafile); ClientHandler.CookieContainer.SetSteamMobileCookiesWithMobileToken(mafile.SessionData); } @@ -173,14 +175,10 @@ public static class MaClient public static async Task ConfirmLoginRequest(Mafile mafile) { - if (mafile.SessionData == null) - { - throw new SessionExpiredException(); - } - ValidateMafile(mafile); - var token = mafile.SessionData.GetMobileToken()!.Value; SetProxy(mafile); + var token = mafile.SessionData!.GetMobileToken()!.Value; + var uri = "https://api.steampowered.com/IAuthenticationService/GetAuthSessionsForAccount/v1?access_token=" + token.Token; GetAuthSessionsForAccount_Response getsess; diff --git a/NebulaAuth/Model/SessionHandler.cs b/NebulaAuth/Model/SessionHandler.cs index 866d3ee..dff23a5 100644 --- a/NebulaAuth/Model/SessionHandler.cs +++ b/NebulaAuth/Model/SessionHandler.cs @@ -16,7 +16,7 @@ public static class SessionHandler string? password = null; try { - if (!string.IsNullOrWhiteSpace(mafile.Password)) + if (PHandler.IsPasswordSet && !string.IsNullOrWhiteSpace(mafile.Password)) { password = PHandler.Decrypt(mafile.Password); } @@ -31,8 +31,9 @@ public static class SessionHandler { return await func(); } - catch (SessionExpiredException) when (mafile.SessionData is not { RefreshToken.IsExpired: true}) + catch (SessionInvalidException) when (mafile.SessionData is { RefreshToken.IsExpired: false}) { + Shell.Logger.Debug("Token on mafile {name} {steamid} expired. Trying to refresh", mafile.AccountName, mafile.SessionData?.SteamId); refreshed = await TryRefresh(mafile); } catch (SessionInvalidException) diff --git a/NebulaAuth/NebulaAuth.csproj b/NebulaAuth/NebulaAuth.csproj index 91bb361..f18c531 100644 --- a/NebulaAuth/NebulaAuth.csproj +++ b/NebulaAuth/NebulaAuth.csproj @@ -10,7 +10,7 @@ en;ru;ua Theme\lock.ico 7.0 - 1.4.9 + 1.5.0 diff --git a/NebulaAuth/update.xml b/NebulaAuth/update.xml index 0ef2a14..d4afea0 100644 --- a/NebulaAuth/update.xml +++ b/NebulaAuth/update.xml @@ -1,7 +1,7 @@  - 1.4.9.0 - https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.4.9/NebulaAuth.1.4.9.zip - https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.4.9.html + 1.5.0.0 + https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.5.0/NebulaAuth.1.5.0.zip + https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.5.0.html false \ No newline at end of file diff --git a/SteamLibForked/SteamLibForked.csproj b/SteamLibForked/SteamLibForked.csproj index d73ab15..dac5e9a 100644 --- a/SteamLibForked/SteamLibForked.csproj +++ b/SteamLibForked/SteamLibForked.csproj @@ -8,7 +8,7 @@ - + diff --git a/changelog/1.5.0.html b/changelog/1.5.0.html new file mode 100644 index 0000000..827950e --- /dev/null +++ b/changelog/1.5.0.html @@ -0,0 +1,78 @@ + + + + + + Changelog + + + + +
+ +
+
Version 1.5.0
+
13.05.2024
+
+ - FIX: Fixed proxy 407 error when using proxy with different credentials +
+
+
+ + + \ No newline at end of file