Guard against null
This commit is contained in:
parent
596822f676
commit
98eb31194c
|
|
@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Authentication
|
|||
}
|
||||
|
||||
var result = await handler.AuthenticateAsync();
|
||||
if (result.Succeeded)
|
||||
if (result?.Succeeded)
|
||||
{
|
||||
var transformed = await Transform.TransformAsync(result.Principal);
|
||||
return AuthenticateResult.Success(new AuthenticationTicket(transformed, result.Properties, result.Ticket.AuthenticationScheme));
|
||||
|
|
|
|||
Loading…
Reference in New Issue