.NetCore JwtBearerAuthentication not rejecting expired tokens
I stumbled over the answer here if anyone is interested. Default value for ClockSkew is 5 minutes. app.UseJwtBearerAuthentication(new JwtBearerOptions() { AutomaticAuthenticate = true, AutomaticChallenge = true, TokenValidationParameters = new TokenValidationParameters() { ValidIssuer = Configuration[“Tokens:Issuer”], ValidAudience = Configuration[“Tokens:Audience”], ValidateIssuerSigningKey = true, IssuerSigningKey = new Certificate(certPath: Configuration[“Tokens:Certificate”], isValid: false).SecurityKey, ValidateLifetime = true, ValidateIssuer = true, ValidateAudience = … Read more