JwtSecurityTokenHandler.ReadJwtToken is not reading the issuer #3005
Labels
Dependency Mismatch
Transitive dependency might be at play and create issues resulting in incorrect versions of a class
Hi,
I'm using ASP.NET Core 8 Web API, and I encountered an "Unauthorized" error with the token I generated. While debugging, I discovered that
JwtSecurityTokenHandler.ReadJwtToken
is not reading theiss
claim from the token. However, when I checked the same token on the jwt.io website, I could see theiss
claim present. I'm confused about what's happening. Below, I'm attaching a sample of the code for reference.This is the
GenerateToken
function, where I'm writing the token and reading it immediately to debug what the issue is.token variable value:
jwtToken variable value:
When reading the same token, it does not show the
iss
. Due to this, when validating the token, I always get an error.The text was updated successfully, but these errors were encountered: