duosecurity / duo_universal_csharp

Duo OIDC-based two-factor authentication for .NET web applications
https://duo.com/docs/duoweb
19 stars 7 forks source link

Cannot open System.Text.Json #46

Open sswrighton opened 1 week ago

sswrighton commented 1 week ago

The logic is throwing an error when it attempts to generate the URL to send the browser to DUO. The error is that it cannot open the System.Text.Json DLL version 5.0.0.0 even though the dependency is 5.0.0.2 and I'm using version 8. Something similar happens with Microsoft.Identity.Token DLL wanting 6.34 though I'm on version 6.35.

The exception means that I don't get the redirect URL, so the site stays on the page instead of going to the DUO prompt.

Expected Behavior

Should load the DUO prompt.

Actual Behavior

Remains on the 'send to Duo' page.

Steps to Reproduce

Publish version Duo Universal 1.25 Try to authenticate with duo

Workarounds

None.

sswrighton commented 1 week ago

Here's one of the actual Exception messages:

Could not load file or assembly 'System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at DuoUniversal.JwtUtils.SerializeParams(IDictionary2 payloadParams) at DuoUniversal.JwtUtils.CreateSignedJwt(String clientId, String clientSecret, String audience, IDictionary2 additionalClaims) at DuoUniversal.Client.GenerateAuthUri(String username, String state) at .DuoMFALogin.Page_Load(Object sender, EventArgs e)