cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5092
Views
0
Helpful
2
Replies

JWT is not well formed

msde
Level 1
Level 1

Hello, I’m adding DUO web sdk v4 to my MVC project. I have added the DUO Universal project to the solution, client seems to work, DUO health check is passed, and am redirected to the API site. I get 2FA notification on my device and click approve (and it’s marked as such in the logs on DUO web site)

My callback function gets the state and the code parameters returned, but upon running the ExchangeAuthorizationCodeFor2faResult, I get an error. Any ideas on how to get past this one?

Code in my callback:
Dim token As IdToken = Await DuoClient.ExchangeAuthorizationCodeFor2faResult(code, sessionUsername)

I’m failing on the JwtUtils.cs line 69 TokenValidationResult result = jwtHandler.ValidateToken(jwt, validationParameters);

the result is not valid and error is

Message = "IDX14100: JWT is not well formed: ‘[PII of type ‘System.String’ is hidden. For more details, see Bing]’, there are no dots (.).\nThe token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EndcodedPa…

Please help!
Thanks,
Marc

1 Accepted Solution

Accepted Solutions

msde
Level 1
Level 1

Updating in case anyone else gets stuck on this - had to add assembly bindings to force use of System.Text.Json to version 7.0.0.0; it wanted to use an older version

Marc

View solution in original post

2 Replies 2

msde
Level 1
Level 1

Updating in case anyone else gets stuck on this - had to add assembly bindings to force use of System.Text.Json to version 7.0.0.0; it wanted to use an older version

Marc

Thank you for coming back to share your solution.

Duo, not DUO.
Quick Links