From 324d20841662a6c7cf92129ee9aa79bead686462 Mon Sep 17 00:00:00 2001 From: Archi Date: Wed, 11 Oct 2023 19:22:40 +0200 Subject: [PATCH] Kill old refresh token when getting Expired/Expired --- ArchiSteamFarm/Steam/Bot.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Steam/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs index 1265f0c93..fb3c6477d 100644 --- a/ArchiSteamFarm/Steam/Bot.cs +++ b/ArchiSteamFarm/Steam/Bot.cs @@ -2081,7 +2081,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable { case EResult.AccountLoginDeniedNeedTwoFactor: case EResult.AccountLoginDeniedThrottle: case EResult.DuplicateRequest: // This will happen if user reacts to popup and tries to use the code afterwards, we have the code saved in ASF, we just need to try again - case EResult.Expired: // Same as Timeout + case EResult.Expired: // Refresh token expired case EResult.FileNotFound: // User denied approval despite telling us that he accepted it, just try again case EResult.InvalidPassword: case EResult.NoConnection: @@ -2629,6 +2629,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable { // Do not attempt to reconnect, those failures are permanent return; case EResult.AccessDenied when !string.IsNullOrEmpty(BotDatabase.RefreshToken): + case EResult.Expired when !string.IsNullOrEmpty(BotDatabase.RefreshToken): case EResult.InvalidPassword when !string.IsNullOrEmpty(BotDatabase.RefreshToken): // We can retry immediately BotDatabase.RefreshToken = null;