Skip to content

Commit

Permalink
netf fixes as always
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Oct 19, 2023
1 parent d3dd8a5 commit 374dede
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ArchiSteamFarm/Steam/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ private string? AccessToken {
return;
}

JwtSecurityToken? jwtToken = Utilities.ReadJwtToken(value);
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
JwtSecurityToken? jwtToken = Utilities.ReadJwtToken(value!);

if (jwtToken == null) {
return;
Expand Down Expand Up @@ -1534,7 +1535,7 @@ internal async Task<bool> RefreshWebSession() {

if (!string.IsNullOrEmpty(AccessToken) && AccessTokenValidUntil.HasValue && (AccessTokenValidUntil.Value > now.AddMinutes(5))) {
// We can use the tokens we already have
if (await ArchiWebHandler.Init(SteamID, SteamClient.Universe, AccessToken, SteamParentalActive ? BotConfig.SteamParentalCode : null).ConfigureAwait(false)) {
if (await ArchiWebHandler.Init(SteamID, SteamClient.Universe, AccessToken!, SteamParentalActive ? BotConfig.SteamParentalCode : null).ConfigureAwait(false)) {
InitRefreshTokensTimer(AccessTokenValidUntil.Value);

return true;
Expand All @@ -1551,7 +1552,7 @@ internal async Task<bool> RefreshWebSession() {
return false;
}

CAuthentication_AccessToken_GenerateForApp_Response? response = await ArchiHandler.GenerateAccessTokens(RefreshToken).ConfigureAwait(false);
CAuthentication_AccessToken_GenerateForApp_Response? response = await ArchiHandler.GenerateAccessTokens(RefreshToken!).ConfigureAwait(false);

if (response == null) {
// The request has failed, in almost all cases this means our refresh token is no longer valid, relog needed
Expand Down

0 comments on commit 374dede

Please sign in to comment.