diff --git a/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs b/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs index 927b3db..29b0f7b 100644 --- a/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs +++ b/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs @@ -19,6 +19,7 @@ using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Stormpath.Owin.Abstractions.Configuration; @@ -64,7 +65,7 @@ public StormpathAuthenticationMiddleware( } _config = integrationConfiguration; - _logger = logger; + _logger = logger ?? NullLogger.Instance; } protected override AuthenticationHandler CreateHandler()