UserManager<TUser>.GenerateNewTwoFactorRecoveryCodesAsync(TUser, Int32) UserManager<TUser>.GenerateNewTwoFactorRecoveryCodesAsync(TUser, Int32) UserManager<TUser>.GenerateNewTwoFactorRecoveryCodesAsync(TUser, Int32) Method

Definition

Generates recovery codes for the user, this invalidates any previous recovery codes for the user.

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))

Parameters

user
TUser TUser TUser

The user to generate recovery codes for.

number
Int32 Int32 Int32

The number of codes to generate.

Returns

The new recovery codes for the user. Note: there may be less than number returned, as duplicates will be removed.

Applies to