mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 22:20:52 +00:00
Add hotfix for empty access token with EResult.OK
This commit is contained in:
@@ -1555,10 +1555,12 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
|
||||
|
||||
CAuthentication_AccessToken_GenerateForApp_Response? response = await ArchiHandler.GenerateAccessTokens(RefreshToken!).ConfigureAwait(false);
|
||||
|
||||
if (response == null) {
|
||||
if (string.IsNullOrEmpty(response?.access_token)) {
|
||||
// The request has failed, in almost all cases this means our refresh token is no longer valid, relog needed
|
||||
BotDatabase.RefreshToken = RefreshToken = null;
|
||||
|
||||
ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, nameof(ArchiHandler.GenerateAccessTokens)));
|
||||
|
||||
await Connect(true).ConfigureAwait(false);
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user