Share via


UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.SetTwoFactorEnabledAsync Method (TUser, Boolean)

 

Asynchronously sets the Two Factor provider for the user.

Namespace:   Microsoft.AspNet.Identity.EntityFramework
Assembly:  Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)

Syntax

public virtual Task SetTwoFactorEnabledAsync(
    TUser user,
    bool enabled
)
public:
virtual Task^ SetTwoFactorEnabledAsync(
    TUser user,
    bool enabled
)
abstract SetTwoFactorEnabledAsync : 
        user:'TUser *
        enabled:bool -> Task
override SetTwoFactorEnabledAsync : 
        user:'TUser *
        enabled:bool -> Task
Public Overridable Function SetTwoFactorEnabledAsync (
    user As TUser,
    enabled As Boolean
) As Task

Parameters

  • user
    Type: TUser

    The user.

  • enabled
    Type: System.Boolean

    true to enable the Two Factor provider; otherwise, false.

Return Value

Type: System.Threading.Tasks.Task

The task representing the asynchronous operation.

Implements

IUserTwoFactorStore<TUser, TKey>.SetTwoFactorEnabledAsync(TUser, Boolean)

See Also

UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> Class
Microsoft.AspNet.Identity.EntityFramework Namespace
ASP.NET Identity

Return to top