AuthenticatorTokenProvider<TUser>.CanGenerateTwoFactorTokenAsync 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.
Checks if a two-factor authentication token can be generated for the specified user
.
public:
virtual System::Threading::Tasks::Task<bool> ^ CanGenerateTwoFactorTokenAsync(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ manager, TUser user);
public virtual System.Threading.Tasks.Task<bool> CanGenerateTwoFactorTokenAsync (Microsoft.AspNetCore.Identity.UserManager<TUser> manager, TUser user);
abstract member CanGenerateTwoFactorTokenAsync : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * 'User -> System.Threading.Tasks.Task<bool>
override this.CanGenerateTwoFactorTokenAsync : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * 'User -> System.Threading.Tasks.Task<bool>
Public Overridable 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 authenticator key set, otherwise false.