EmailTokenProvider<TUser>.CanGenerateTwoFactorTokenAsync Method

Definition

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

C#
public override System.Threading.Tasks.Task<bool> CanGenerateTwoFactorTokenAsync (Microsoft.AspNetCore.Identity.UserManager<TUser> manager, TUser user);

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

Product Versions
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