jwt – JwtBearer middleware with ES256 always 401 Bearer error=”invalid_token”, error_description=”The signature key was not found”

token is created using public class AppTokenHandler : TokenValidator, IAppTokenHandler { private readonly JwtSecurityTokenHandler _handler = new JwtSecurityTokenHandler(); private readonly AppTokenConfiguration _appTokenConfiguration; private readonly RsaSecurityKey _publicKey; private readonly ECDsa _key; public AppTokenHandler(IOptions<AppTokenConfiguration> appTokenConfiguration, RsaSecurityKey publicKey, ECDsa key) { _appTokenConfiguration = appTokenConfiguration.Value; _publicKey = publicKey; _key = key; } public string Create(Dictionary<string, object> claims) { var … Read more