diff --git a/.github/renovate.json5 b/.github/renovate.json5
index 1d2294df4..200c54878 100644
--- a/.github/renovate.json5
+++ b/.github/renovate.json5
@@ -19,12 +19,6 @@
"allowedVersions": "<= 3.1",
"matchManagers": [ "nuget" ],
"matchPackageNames": [ "Microsoft.Extensions.Configuration.Json", "Microsoft.Extensions.Logging.Configuration" ]
- },
- {
- // TODO: Stick with SK2 version until we can remove the submodule
- "enabled": false,
- "matchManagers": [ "nuget" ],
- "matchPackageNames": [ "Microsoft.Win32.Registry", "protobuf-net" ]
}
]
}
diff --git a/ArchiSteamFarm/ArchiSteamFarm.csproj b/ArchiSteamFarm/ArchiSteamFarm.csproj
index 81725cbc9..e2717031a 100644
--- a/ArchiSteamFarm/ArchiSteamFarm.csproj
+++ b/ArchiSteamFarm/ArchiSteamFarm.csproj
@@ -13,21 +13,16 @@
-
-
+
-
-
- Temp\SteamKit2.dll
-
diff --git a/ArchiSteamFarm/Steam/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs
index 1cf416265..fd68b146f 100644
--- a/ArchiSteamFarm/Steam/Bot.cs
+++ b/ArchiSteamFarm/Steam/Bot.cs
@@ -54,6 +54,7 @@ using ArchiSteamFarm.Web;
using JetBrains.Annotations;
using Newtonsoft.Json;
using SteamKit2;
+using SteamKit2.Authentication;
using SteamKit2.Internal;
namespace ArchiSteamFarm.Steam;
@@ -157,7 +158,6 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
private readonly SemaphoreSlim MessagingSemaphore = new(1, 1);
private readonly ConcurrentDictionary PastNotifications = new();
private readonly SemaphoreSlim SendCompleteTypesSemaphore = new(1, 1);
- private readonly SteamAuthentication SteamAuthentication;
private readonly SteamClient SteamClient;
private readonly ConcurrentHashSet SteamFamilySharingIDs = new();
private readonly SteamUser SteamUser;
@@ -298,8 +298,6 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
CallbackManager.Subscribe(OnGuestPassList);
CallbackManager.Subscribe(OnLicenseList);
- SteamAuthentication = SteamClient.GetHandler() ?? throw new InvalidOperationException(nameof(SteamAuthentication));
-
SteamFriends = SteamClient.GetHandler() ?? throw new InvalidOperationException(nameof(SteamFriends));
CallbackManager.Subscribe(OnFriendsList);
CallbackManager.Subscribe(OnPersonaState);
@@ -2460,13 +2458,13 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
InitConnectionFailureTimer();
if (string.IsNullOrEmpty(refreshToken)) {
- SteamAuthentication.AuthPollResult pollResponse;
+ AuthPollResult pollResult;
try {
using CancellationTokenSource authCancellationTokenSource = new();
- SteamAuthentication.CredentialsAuthSession authSession = await SteamAuthentication.BeginAuthSessionViaCredentials(
- new SteamAuthentication.AuthSessionDetails {
+ CredentialsAuthSession authSession = await SteamClient.Authentication.BeginAuthSessionViaCredentialsAsync(
+ new AuthSessionDetails {
Authenticator = new BotCredentialsProvider(this, authCancellationTokenSource),
DeviceFriendlyName = SharedInfo.PublicIdentifier,
GuardData = BotConfig.UseLoginKeys ? BotDatabase.SteamGuardData : null,
@@ -2476,7 +2474,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
}
).ConfigureAwait(false);
- pollResponse = await authSession.StartPolling(authCancellationTokenSource.Token).ConfigureAwait(false);
+ pollResult = await authSession.PollingWaitForResultAsync(authCancellationTokenSource.Token).ConfigureAwait(false);
} catch (AuthenticationException e) {
ArchiLogger.LogGenericWarningException(e);
@@ -2491,13 +2489,13 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
return;
}
- refreshToken = pollResponse.RefreshToken;
+ refreshToken = pollResult.RefreshToken;
if (BotConfig.UseLoginKeys) {
BotDatabase.RefreshToken = BotConfig.PasswordFormat.HasTransformation() ? ArchiCryptoHelper.Encrypt(BotConfig.PasswordFormat, refreshToken) : refreshToken;
- if (!string.IsNullOrEmpty(pollResponse.NewGuardData)) {
- BotDatabase.SteamGuardData = pollResponse.NewGuardData;
+ if (!string.IsNullOrEmpty(pollResult.NewGuardData)) {
+ BotDatabase.SteamGuardData = pollResult.NewGuardData;
}
}
}
diff --git a/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs b/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs
index ee1cce833..bf5291c18 100644
--- a/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs
+++ b/ArchiSteamFarm/Steam/Integration/BotCredentialsProvider.cs
@@ -27,6 +27,7 @@ using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Localization;
using SteamKit2;
+using SteamKit2.Authentication;
namespace ArchiSteamFarm.Steam.Integration;
@@ -46,11 +47,11 @@ internal sealed class BotCredentialsProvider : IAuthenticator {
CancellationTokenSource = cancellationTokenSource;
}
- public Task AcceptDeviceConfirmation() => Task.FromResult(false);
+ public Task AcceptDeviceConfirmationAsync() => Task.FromResult(false);
- public async Task ProvideDeviceCode(bool previousCodeWasIncorrect) => await ProvideInput(ASF.EUserInputType.TwoFactorAuthentication, previousCodeWasIncorrect).ConfigureAwait(false);
+ public async Task GetDeviceCodeAsync(bool previousCodeWasIncorrect) => await ProvideInput(ASF.EUserInputType.TwoFactorAuthentication, previousCodeWasIncorrect).ConfigureAwait(false);
- public async Task ProvideEmailCode(string email, bool previousCodeWasIncorrect) => await ProvideInput(ASF.EUserInputType.SteamGuard, previousCodeWasIncorrect).ConfigureAwait(false);
+ public async Task GetEmailCodeAsync(string email, bool previousCodeWasIncorrect) => await ProvideInput(ASF.EUserInputType.SteamGuard, previousCodeWasIncorrect).ConfigureAwait(false);
private async Task ProvideInput(ASF.EUserInputType inputType, bool previousCodeWasIncorrect) {
if (!Enum.IsDefined(inputType)) {
diff --git a/ArchiSteamFarm/Temp/SteamKit2.dll b/ArchiSteamFarm/Temp/SteamKit2.dll
deleted file mode 100644
index 205d64420..000000000
Binary files a/ArchiSteamFarm/Temp/SteamKit2.dll and /dev/null differ
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 2f7a9a73c..ad7b7d3bb 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,14 +7,12 @@
-
-
-
+