UserManager<TUser>.RedeemTwoFactorRecoveryCodeAsync 方法

定义

返回恢复代码是否对用户有效。 注意:恢复代码仅有效一次,使用后无效。

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ RedeemTwoFactorRecoveryCodeAsync(TUser user, System::String ^ code);
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)

参数

user
TUser

拥有恢复代码的用户。

code
String

要使用的恢复代码。

返回

如此 如果为用户找到恢复代码。

适用于