Dela via


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.GetTwoFactorEnabledAsync Method

Definition

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

public virtual System.Threading.Tasks.Task<bool> GetTwoFactorEnabledAsync (TUser user, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTwoFactorEnabledAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.GetTwoFactorEnabledAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function GetTwoFactorEnabledAsync (user As TUser, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

user
TUser

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

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

The Task that represents the asynchronous operation, containing a flag indicating whether the specified user has two factor authentication enabled or not.

Implements

Applies to