diff --git a/src/Api/Startup.cs b/src/Api/Startup.cs index f5a598da439c..602da8cd3969 100644 --- a/src/Api/Startup.cs +++ b/src/Api/Startup.cs @@ -206,7 +206,7 @@ public void Configure( Func serilogFilter = (e) => { var context = e.Properties["SourceContext"].ToString(); - if(context == typeof(JwtBearerMiddleware).FullName && e.Level == LogEventLevel.Error) + if(e.Exception != null && e.Exception.GetType() == typeof(SecurityTokenValidationException) || e.Exception.Message == "Bad security stamp.") { return false; }