diff --git a/src/Microsoft.AspNetCore.Identity/UserClaimsPrincipalFactory.cs b/src/Microsoft.AspNetCore.Identity/UserClaimsPrincipalFactory.cs
index e58ba0ae99..20062e6470 100644
--- a/src/Microsoft.AspNetCore.Identity/UserClaimsPrincipalFactory.cs
+++ b/src/Microsoft.AspNetCore.Identity/UserClaimsPrincipalFactory.cs
@@ -113,7 +113,17 @@ namespace Microsoft.AspNetCore.Identity
{
id.AddClaims(await UserManager.GetClaimsAsync(user));
}
- return new ClaimsPrincipal(id);
+ return await CreatePrincipalAsync(id);
+ }
+
+ ///
+ /// Creates a from a .
+ ///
+ /// The with claims.
+ /// The that represents the asynchronous creation operation, containing the with the .
+ protected virtual Task CreatePrincipalAsync(ClaimsIdentity id)
+ {
+ return Task.FromResult(new ClaimsPrincipal(id));
}
}
}
\ No newline at end of file