
vtvux (vtvux) asked a question.
I cloned the application demo logging into a Blazor app using https://github.com/okta/samples-blazor.git.
I ended up creating my own Blazor app with the most recent version of Okta.AspNetCore, but duplicating everything found in the sample.
Very few bumps in the road until this one. When my token comes back, I immediately am greeted with this message like the token I received back is wrong: The Validated Security Token must be of type JsonWebToken, but instead its type is 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken'.
Where is it set up what type of token I get back?

Hi Mike,
Thanks for contacting the OKTA community.
For having trouble with JsonWebToken please refer this URL: https://stackoverflow.com/questions/48476625/having-trouble-with-jsonwebtoken-jsonwebtoken-error-jwt-must-be-provided
This is a completely different issue.
Hi @vtvux (vtvux) ,
Just wanted to check if you already solved this? I'm facing same problem. Im using .Net Core 8.0
Not really. I was forced to downgrade Okta.AspNetCore one version to 4.5.0. But if you do that, there are project vulnerabilities in two of the JWT-related nuget packages (Microsoft.IdentityModel.JsonWebTokens & System.IdentityModel.Tokens.Jwt). I took those two and upgraded them the same major version...but the highest one, (6.35.0) making sure they didn't have vulnerabilities anymore. That got me on the way again and I successfully implemented my auth task.
Thanks @vtvux (vtvux) , it's working now. You saved my day 🙂
Looks like an update is required on the nuget package to match new changes in .NET 8 https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/8.0/securitytoken-events.