Dela via


EmailTokenProvider<TUser>.CanGenerateTwoFactorTokenAsync Method

Definition

Checks if a two-factor authentication token can be generated for the specified user.

public:
 override System::Threading::Tasks::Task<bool> ^ CanGenerateTwoFactorTokenAsync(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ manager, TUser user);
public override System.Threading.Tasks.Task<bool> CanGenerateTwoFactorTokenAsync (Microsoft.AspNetCore.Identity.UserManager<TUser> manager, TUser user);
override this.CanGenerateTwoFactorTokenAsync : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * 'User -> System.Threading.Tasks.Task<bool>
Public Overrides Function CanGenerateTwoFactorTokenAsync (manager As UserManager(Of TUser), user As TUser) As Task(Of Boolean)

Parameters

manager
UserManager<TUser>

The UserManager<TUser> to retrieve the user from.

user
TUser

The TUser to check for the possibility of generating a two-factor authentication token.

Returns

True if the user has an email address set, otherwise false.

Applies to