Skip to content

Commit 5268497

Browse files
author
Andrew Omondi
committed
fix: ensures valid handler is returned in browser scenarios
1 parent 0b6e132 commit 5268497

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@
6363
</None>
6464
</ItemGroup>
6565
<ItemGroup>
66-
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.3.1" />
67-
<PackageReference Include="Microsoft.IdentityModel.Validators" Version="8.3.1" />
66+
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.6.1" />
67+
<PackageReference Include="Microsoft.IdentityModel.Validators" Version="8.6.1" />
6868
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
6969
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.17.1" />
7070
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.17.1" />
7171
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.17.1" />
72-
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.16.4" />
73-
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.16.4" />
72+
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.17.1" />
73+
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.17.1" />
7474
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.17.1" />
75-
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.16.4" />
75+
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.17.1" />
7676
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.13.2">
7777
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
7878
<PrivateAssets>all</PrivateAssets>

src/Microsoft.Graph.Core/Requests/GraphClientFactory.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.Graph
99
using System.Net;
1010
using System.Net.Http;
1111
using System.Net.Http.Headers;
12-
using System.Threading;
12+
using System.Runtime.InteropServices;
1313
using Azure.Core;
1414
using Microsoft.Graph.Authentication;
1515
using Microsoft.Kiota.Abstractions.Authentication;
@@ -253,6 +253,11 @@ internal static (HttpMessageHandler Pipeline, FeatureFlag FeatureFlags) CreatePi
253253
/// </returns>
254254
internal static HttpMessageHandler GetNativePlatformHttpHandler(IWebProxy proxy = null)
255255
{
256+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("browser")))
257+
{
258+
// We can't produce a browser specific binary as the TFM is only available in net8 and above.
259+
return new HttpClientHandler { AllowAutoRedirect = false };
260+
}
256261
#if IOS || MACCATALYST
257262
return new NSUrlSessionHandler { AllowAutoRedirect = false };
258263
#elif MACOS

0 commit comments

Comments
 (0)