Language

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

 

Sets whether two factor authentication is enabled for the user.

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

Syntax

Task SetTwoFactorEnabledAsync(
    TUser user,
    bool enabled
)
Task^ SetTwoFactorEnabledAsync(
    TUser user,
    bool enabled
)
abstract SetTwoFactorEnabledAsync :
        user:'TUser *
        enabled:bool -> Task
Function SetTwoFactorEnabledAsync (
    user As TUser,
    enabled As Boolean
) As Task

Parameters

  • user Type: TUser

    The user to set for.

  • enabled Type: System.Boolean

    true to enable the two factor authentication; otherwise, false.

Return Value

Type: System.Threading.Tasks.Task

The task object representing the asynchronous operation.

See Also

IUserTwoFactorStore<TUser, TKey> Interface Microsoft.AspNet.Identity Namespace [ASP.NET Identity](https://go.microsoft.com/fwlink/p/?linkid=393664.

Return to top