Delen via


UserManager<TUser>.GenerateTwoFactorTokenAsync(TUser, String) Method

Definition

Gets a two factor authentication token for the specified user.

public:
 virtual System::Threading::Tasks::Task<System::String ^> ^ GenerateTwoFactorTokenAsync(TUser user, System::String ^ tokenProvider);
public virtual System.Threading.Tasks.Task<string> GenerateTwoFactorTokenAsync (TUser user, string tokenProvider);
abstract member GenerateTwoFactorTokenAsync : 'User * string -> System.Threading.Tasks.Task<string>
override this.GenerateTwoFactorTokenAsync : 'User * string -> System.Threading.Tasks.Task<string>
Public Overridable Function GenerateTwoFactorTokenAsync (user As TUser, tokenProvider As String) As Task(Of String)

Parameters

user
TUser

The user the token is for.

tokenProvider
String

The provider which will generate the token.

Returns

The Task that represents result of the asynchronous operation, a two factor authentication token for the user.

Applies to