mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Fix LoginLimiter being ignored on non-ASF 2FA accounts
This commit is contained in:
@@ -541,11 +541,13 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
// Use limiter only when user is not providing 2FA token by himself
|
||||
if (string.IsNullOrEmpty(TwoFactorCode) && (BotDatabase.MobileAuthenticator != null)) {
|
||||
if (string.IsNullOrEmpty(TwoFactorCode)) {
|
||||
await LimitLoginRequestsAsync().ConfigureAwait(false);
|
||||
|
||||
// In this case, we can also use ASF 2FA for providing 2FA token, even if it's not required
|
||||
TwoFactorCode = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false);
|
||||
if (BotDatabase.MobileAuthenticator != null) {
|
||||
// In this case, we can also use ASF 2FA for providing 2FA token, even if it's not required
|
||||
TwoFactorCode = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
lock (SteamClient) {
|
||||
|
||||
Reference in New Issue
Block a user