diff --git a/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationService.cs b/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationService.cs index 346f8e14a2..54bdd82d5a 100644 --- a/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationService.cs +++ b/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationService.cs @@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Authentication } var result = await handler.AuthenticateAsync(); - if (result?.Succeeded) + if (result != null && result.Succeeded) { var transformed = await Transform.TransformAsync(result.Principal); return AuthenticateResult.Success(new AuthenticationTicket(transformed, result.Properties, result.Ticket.AuthenticationScheme));