For the first time I'm creating Authorization in ASP.NET Core. I used tutorial from here TUTORIAL
The problem is when I sending request from postman:
Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6I...
to my method in controller decorated with [Authorize] attribute.
I receive 401 Unauthorized
always... I saw comments bellow that tutorial and it seems that some people have similar issue also. I've no idea how I can solve this problem.
JwtBearerMiddleware
should produce a lot of log events. Add a logger inStartup.Configure
method and check it. – AncestressWWW-Authenticate: Bearer error="invalid_token", error_description="The signature is invalid"
– Babe