okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
157 stars 100 forks source link

IDX11025: Cannot serialize object of type: 'System.Guid' into property: 'jti'. #737

Closed pedrollanesbenchmark closed 1 month ago

pedrollanesbenchmark commented 2 months ago

Describe the bug?

Excecption detail: at Okta.Sdk.Client.DefaultDpopProofJwtGenerator.GenerateJwt(String nonce, String httpMethod, String uri, String accessToken) at Okta.Sdk.Api.OAuthApi.d18.MoveNext() at Okta.Sdk.Api.OAuthApi.d17.MoveNext() at Okta.Sdk.Client.DefaultOAuthTokenProvider.d15.MoveNext() at Okta.Sdk.Client.DefaultOAuthTokenProvider.d7.MoveNext() at Okta.Sdk.Client.DefaultOAuthTokenProvider.d12.MoveNext() at Okta.Sdk.Api.UserApi.d43.MoveNext() at Okta.Sdk.Api.UserApi.d__42.MoveNext()

What is expected to happen?

it seems that DefaultDpopProofJwtGenerator need to make tostring when it set jti guid.

What is the actual behavior?

It crash

Reproduction Steps?

calling to UserApi

Additional Information?

JTI microsoft is string: https://learn.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtpayload.jti?view=msal-web-dotnet-latest#system-identitymodel-tokens-jwt-jwtpayload-jti

.NET Version

netcore8

SDK Version

8.0.1

OS version

BuildNumber Caption OSArchitecture Version 19045 Microsoft Windows 10 Enterprise 64-bit 10.0.19045

bryanapellanes-okta commented 2 months ago

@pedrollanesbenchmark Thanks for bringing this to our attention! I've opened an internal issue for tracking and prioritization OKTA-791311. We will work with Developer Support to address your support case and resolve this issue.

bryanapellanes-okta commented 2 months ago

This appears to be a duplicate of #682

pedrollanesbenchmark commented 2 months ago

No @bryanapellanes-okta , there is not the same case. The problem in my wrote issue is in class DefaultDpopProofJwtGenerator, and the solution in this solution is DefaultJwtGenerator.cs class, not the same. Thanks

pedrollanesbenchmark commented 2 months ago

For more info:

The Okta SDK use Microsoft Identity Model >= v6.35.0. If I then upgrade the version of that package to v7.1.2 I get the same error.

pedrollanesbenchmark commented 2 months ago

@pedrollanesbenchmark Thanks for bringing this to our attention! I've opened an internal issue for tracking and prioritization OKTA-791311. We will work with Developer Support to address your support case and resolve this issue.

Good morning @bryanapellanes-okta any news?

bhavik-thakkar-okta commented 1 month ago

Hey @pedrollanesbenchmark thanks for your follow-up. We have currently added this on to our priority list and we will prioritize this accordingly and we will get back to you once its added to our sprint scope for some concrete timelines.