SignInManager<TUser>.SignInOrTwoFactorAsync Method

Definition

Signs in the specified user if bypassTwoFactor is set to false. Otherwise stores the user for use after a two factor check.

protected virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult> SignInOrTwoFactorAsync (TUser user, bool isPersistent, string loginProvider = default, bool bypassTwoFactor = false);
protected virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult> SignInOrTwoFactorAsync (TUser user, bool isPersistent, string? loginProvider = default, bool bypassTwoFactor = false);
abstract member SignInOrTwoFactorAsync : 'User * bool * string * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult>
override this.SignInOrTwoFactorAsync : 'User * bool * string * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult>
Protected Overridable Function SignInOrTwoFactorAsync (user As TUser, isPersistent As Boolean, Optional loginProvider As String = Nothing, Optional bypassTwoFactor As Boolean = false) As Task(Of SignInResult)

Parameters

user
TUser
isPersistent
Boolean

Flag indicating whether the sign-in cookie should persist after the browser is closed.

loginProvider
String

The login provider to use. Default is null

bypassTwoFactor
Boolean

Flag indicating whether to bypass two factor authentication. Default is false

Returns

Returns a SignInResult

Applies to