You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 27, 2023. It is now read-only.
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware:Information: Bearer was not authenticated. Failure message: IDX10703: Unable to decode the 'header': 'eyJhbGciOiJIUzI1NiIsInR5cDI6IkpXVCJ9' as Base64url encoded string. jwtEncodedString: 'the invalid token'.
The 404 is a result of something, I'm guessing either one of these:
AspNetCore.Authentication.Cookies
AspNetCore.Authentication.JwtBearer
trying to redirect to /Account/Login which doesn't actually exist
As taken from the points raised in the comments here https://stormpath.com/blog/token-authentication-asp-net-core
If you try to make a request with in invalid or expired token the response you get is a 404 not found instead of a 403 Unauthorized.
I can get the code in your repo to do the same.
If you set up in POSTman to
POST /api/values/123
In headers set:
Auhtorazation = Bearer +
You get a 404 not found.
In the output window I can see:
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.d__1.MoveNext()
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:2444/Account/Login?ReturnUrl=%2Fapi%2Fvalues%2F123
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware:Information: Bearer was not authenticated. Failure message: IDX10703: Unable to decode the 'header': 'eyJhbGciOiJIUzI1NiIsInR5cDI6IkpXVCJ9' as Base64url encoded string. jwtEncodedString: 'the invalid token'.
The 404 is a result of something, I'm guessing either one of these:
AspNetCore.Authentication.Cookies
AspNetCore.Authentication.JwtBearer
trying to redirect to /Account/Login which doesn't actually exist