Share via


UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.RedeemCodeAsync 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<bool> ^ RedeemCodeAsync(TUser user, System::String ^ code, System::Threading::CancellationToken cancellationToken);
public virtual System.Threading.Tasks.Task<bool> RedeemCodeAsync (TUser user, string code, System.Threading.CancellationToken cancellationToken);
abstract member RedeemCodeAsync : 'User * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.RedeemCodeAsync : 'User * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function RedeemCodeAsync (user As TUser, code As String, cancellationToken As CancellationToken) As Task(Of Boolean)

Parameters

user
TUser

The user who owns the recovery code.

code
String

The recovery code to use.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

True if the recovery code was found for the user.

Implements

Applies to