共用方式為


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

要產生的程式碼數目。

傳回

使用者的新修復碼。 注意:可能會傳回小於傳回的數位,因為將會移除重複專案。

適用於