UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.RedeemCodeAsync(TUser, String, CancellationToken) UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.RedeemCodeAsync(TUser, String, CancellationToken) 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, 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>

Parameters

user
TUser TUser

The user who owns the recovery code.

code
String String

The recovery code to use.

cancellationToken
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