Odd instructions in an exception from the JWT handler
See original GitHub issueSystem.ArgumentException: IDX12709: JWT is not well formed: ‘[PII is hidden by default. Set the ‘ShowPII’ flag in IdentityModelEventSource.cs to true to reveal it.]’.
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.2.1" />
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
asp.net core - Can't catch exception thrown by JWT.
Look at the exception handling middleware that's in the new project templates. UseExceptionHandler. There's also an AuthenticationFailed Event ...
Read more >JWT Token Expiration and Authorization - Microsoft Q&A
I am working with a JWT in .Net Core 6.0 Web Api. I am struggling with JWT expiration time...not sure if it is...
Read more >REST Security With JWT Using Java and Spring Security
Let's try to examine the state of REST security today, using a straightforward Spring security tutorial to demonstrate it in action. REST (which...
Read more >A look behind the JWT bearer authentication middleware in ...
In this post we look at the JwtBearerAuthenticationMiddleware as a means to understanding authentication in ASP.NET Core in general.
Read more >Weird issues with Notifications endpoint/JWT - Support
Same error with Sqlite, MySQL in docker, and Postgre on another server (in this case I can confirm no table for Notifications exists)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the message just needs to be a bit clearer. The message references a .cs file, making it look like you need to edit something rather than set a static property
Valuable exception informations are hidden now. For example configuration errors are hard to understand, which is unrelated to PII. Setting IdentityModelEventSource.ShowPII = true will lead to have this hardcoded for most developers.
A better approach would be to not expose PII within exception messages, or to obfuscate PII. Or even better, to reduce the number of raised exceptions, remplaced by an error model.