From 98263cca298fb234344c436dd2ee866ab9567a22 Mon Sep 17 00:00:00 2001 From: Ponant Date: Wed, 14 Jun 2017 19:52:42 +0200 Subject: [PATCH] Enlarged access to SignInOrTwoFactorAsync (#1279) Does https://github.com/aspnet/Identity/issues/1274 --- src/Microsoft.AspNetCore.Identity/SignInManager.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.Identity/SignInManager.cs b/src/Microsoft.AspNetCore.Identity/SignInManager.cs index 47d30b5da9..ac8cdb5c52 100644 --- a/src/Microsoft.AspNetCore.Identity/SignInManager.cs +++ b/src/Microsoft.AspNetCore.Identity/SignInManager.cs @@ -670,8 +670,17 @@ namespace Microsoft.AspNetCore.Identity } return identity; } - - private async Task SignInOrTwoFactorAsync(TUser user, bool isPersistent, string loginProvider = null, bool bypassTwoFactor = false) + + /// + /// Signs in the specified if is set to false. + /// Otherwise stores the for use after a two factor check. + /// + /// + /// Flag indicating whether the sign-in cookie should persist after the browser is closed. + /// The login provider to use. Default is null + /// Flag indicating whether to bypass two factor authentication. Default is false + /// Returns a + protected virtual async Task SignInOrTwoFactorAsync(TUser user, bool isPersistent, string loginProvider = null, bool bypassTwoFactor = false) { if (!bypassTwoFactor && UserManager.SupportsUserTwoFactor &&