© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
2y ago
•
1 reply
pdr
Problem with JWT, always returns Unauthorized
Here is my code
. I am using Identity and generated a JWT token
. Apparently
, when I view the token in the JWT viewer
, it is generated as expected
. However
, it always returns
"unauthorized
" when I try to access a route with the
[Authorize
] annotation
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
✅ jwt authentication always returns 401
C
C# / help
3y ago
[Authorize] Always Returns 401 Even With Valid-Looking JWT Token
C
C# / help
3mo ago
if statement always returns true
C
C# / help
12mo ago
❔ ASP.NET always validates invalid JWT
C
C# / help
3y ago