From 84f393a68a7cc245e53ed7a6c02acc471104d863 Mon Sep 17 00:00:00 2001 From: tr4wzified <55751269+tr4wzified@users.noreply.github.com> Date: Thu, 30 May 2024 00:28:28 +0200 Subject: [PATCH] Fix refreshing Nexus OAuth token not working properly --- Wabbajack.Networking.NexusApi/NexusApi.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Wabbajack.Networking.NexusApi/NexusApi.cs b/Wabbajack.Networking.NexusApi/NexusApi.cs index f75974be..d703f8d3 100644 --- a/Wabbajack.Networking.NexusApi/NexusApi.cs +++ b/Wabbajack.Networking.NexusApi/NexusApi.cs @@ -273,6 +273,8 @@ public class NexusApi var response = await _client.PostAsync($"https://users.nexusmods.com/oauth/token", content, cancel); var responseString = await response.Content.ReadAsStringAsync(cancel); var newJwt = JsonSerializer.Deserialize(responseString); + if (newJwt != null) + newJwt.ReceivedAt = DateTime.UtcNow.ToFileTimeUtc(); state.OAuth = newJwt; await AuthInfo.SetToken(state);