C
C#2w ago
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.
No description
No description
No description
No description
1 Reply
Anchy
Anchy2w ago
it looks like you are using the Bearer scheme, inspect the request and see if the Authorization header is set using the Bearer scheme