UserManager<TUser>.SetTwoFactorEnabledAsync(TUser, Boolean) Method

Definition

Sets a flag indicating whether the specified user has two factor authentication enabled or not, as an asynchronous operation.

C#
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetTwoFactorEnabledAsync (TUser user, bool enabled);

Parameters

user
TUser

The user whose two factor authentication enabled status should be set.

enabled
Boolean

A flag indicating whether the specified user has two factor authentication enabled.

Returns

The Task that represents the asynchronous operation, the IdentityResult of the operation

Applies to

منتج الإصدارات
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0