UserManager<TUser>.GenerateNewTwoFactorRecoveryCodesAsync 方法

定义

为用户生成恢复代码,这会使用户以前的任何恢复代码失效。

public:
 virtual System::Threading::Tasks::Task<System::Collections::Generic::IEnumerable<System::String ^> ^> ^ GenerateNewTwoFactorRecoveryCodesAsync(TUser user, int number);
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<string>> GenerateNewTwoFactorRecoveryCodesAsync (TUser user, int number);
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<string>?> GenerateNewTwoFactorRecoveryCodesAsync (TUser user, int number);
abstract member GenerateNewTwoFactorRecoveryCodesAsync : 'User * int -> System.Threading.Tasks.Task<seq<string>>
override this.GenerateNewTwoFactorRecoveryCodesAsync : 'User * int -> System.Threading.Tasks.Task<seq<string>>
Public Overridable Function GenerateNewTwoFactorRecoveryCodesAsync (user As TUser, number As Integer) As Task(Of IEnumerable(Of String))

参数

user
TUser

要为其生成恢复代码的用户。

number
Int32

要生成的代码数。

返回

用户的新恢复代码。 注意:返回的数字可能小于,因为重复项将被删除。

适用于