From fc1bdb9b16e0f4ad4c2ecf7f37b4ee6be2b2b1b7 Mon Sep 17 00:00:00 2001 From: Archi Date: Mon, 3 Apr 2023 12:40:36 +0200 Subject: [PATCH] Closes #2867 --- ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs b/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs index cc9fefa5b..9906dff8d 100644 --- a/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs +++ b/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs @@ -26,6 +26,7 @@ using System.Threading; using System.Threading.Tasks; using ArchiSteamFarm.Core; using ArchiSteamFarm.Localization; +using ArchiSteamFarm.Storage; using SteamKit2; using SteamKit2.Authentication; @@ -48,6 +49,11 @@ internal sealed class BotCredentialsProvider : IAuthenticator { } public async Task AcceptDeviceConfirmationAsync() { + if (Program.Service || (ASF.GlobalConfig?.Headless ?? GlobalConfig.DefaultHeadless)) { + // In headless/service mode, we always fallback to the code instead, as user can't confirm future popup from the next login procedure, and we never wait for current one + return false; + } + if (Bot.HasMobileAuthenticator || Bot.HasLoginCodeReady) { // We don't want device confirmation under any circumstance, we can provide the code on our own return false;