diff --git a/src/NetCoreForce.Client/AuthenticationClient.cs b/src/NetCoreForce.Client/AuthenticationClient.cs index 3f1a1da..636056b 100644 --- a/src/NetCoreForce.Client/AuthenticationClient.cs +++ b/src/NetCoreForce.Client/AuthenticationClient.cs @@ -301,7 +301,9 @@ public async Task TokenRefreshAsync(string refreshToken, string clientId, string if (responseMessage.IsSuccessStatusCode) { this.AccessInfo = JsonConvert.DeserializeObject(response); - this.AccessInfo.RefreshToken = refreshToken; //not included in reponse + + //with refresh token rotation we get a new refresh token after exchanging the current one. + if (string.IsNullOrEmpty(this.AccessInfo.RefreshToken)) this.AccessInfo.RefreshToken = refreshToken; //when not included in response } else { @@ -368,4 +370,4 @@ public void Dispose() _httpClient.Dispose(); } } -} \ No newline at end of file +}