UserManager<TUser>.SetTwoFactorEnabledAsync(TUser, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets a flag indicating whether the specified user
has two factor authentication enabled or not,
as an asynchronous operation.
public:
virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ SetTwoFactorEnabledAsync(TUser user, bool enabled);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetTwoFactorEnabledAsync (TUser user, bool enabled);
abstract member SetTwoFactorEnabledAsync : 'User * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.SetTwoFactorEnabledAsync : 'User * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function SetTwoFactorEnabledAsync (user As TUser, enabled As Boolean) As Task(Of IdentityResult)
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