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

Definition

Returns whether a recovery code is valid for a user. Note: recovery codes are only valid once, and will be invalid after use.

public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> RedeemTwoFactorRecoveryCodeAsync (TUser user, string code);
abstract member RedeemTwoFactorRecoveryCodeAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.RedeemTwoFactorRecoveryCodeAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function RedeemTwoFactorRecoveryCodeAsync (user As TUser, code As String) As Task(Of IdentityResult)

Parameters

user
TUser TUser TUser

The user who owns the recovery code.

code
String String String

The recovery code to use.

Returns

True if the recovery code was found for the user.

Applies to