Hi,
Microsoft have changed the way they configure a Web API in core 2.0 but the Auth0 documentation is for core 1.0. Does anyone have an example of how it should be done in core 2.0 with an asymetric key?
I assume it is something like this
services.AddAuthentication()
.AddJwtBearer(cfg =>
{
cfg.RequireHttpsMetadata = false;
cfg.SaveToken = true;
cfg.TokenValidationParameters = new TokenValidationParameters()
{
ValidIssuer = $"https://{Configuration"Auth0:Domain"]}/",
ValidAudience = Configuration"Auth0:ClientId"],
IssuerSigningKey = IssuerSigningKey = new AsymmetricSecurityKey(Encoding.UTF8.GetBytes(Configuration"AppSettings:Auth0ApiToken"]))
};
});
Thanks.