From 0107308fec0eba2e280ace6dee00672eb0183a98 Mon Sep 17 00:00:00 2001 From: zpc Date: Wed, 10 Jul 2024 01:32:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Users/UserAccount/PhoneAccount/PhoneAccountLogin.cs | 1 + .../VerificationCodeManager/MemoryVerificationCodeManager.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/PhoneAccount/PhoneAccountLogin.cs b/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/PhoneAccount/PhoneAccountLogin.cs index a8a110b..bd1bb57 100644 --- a/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/PhoneAccount/PhoneAccountLogin.cs +++ b/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/PhoneAccount/PhoneAccountLogin.cs @@ -176,6 +176,7 @@ namespace HuanMeng.MiaoYu.Code.Users.UserAccount.PhoneAccount UserId = user.Id, NickName = user.NickName, }; + memoryVerificationCodeManager.RemoveExpiredRefreshCodes(phoneLoginParams.PhoneNumber); return loginAccountInfo; } diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/VerificationCodeManager/MemoryVerificationCodeManager.cs b/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/VerificationCodeManager/MemoryVerificationCodeManager.cs index cc0a202..41989d3 100644 --- a/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/VerificationCodeManager/MemoryVerificationCodeManager.cs +++ b/src/0-core/HuanMeng.MiaoYu.Code/Users/UserAccount/VerificationCodeManager/MemoryVerificationCodeManager.cs @@ -27,7 +27,7 @@ namespace HuanMeng.MiaoYu.Code.Users.UserAccount.VerificationCodeManager //判断是否存在 if (MemoryVerificationCode.ContainsKey(key)) { - if (DateTime.Now.Subtract(MemoryVerificationCode[key].CreateAt).TotalSeconds < 60) + if (DateTime.Now.Subtract(MemoryVerificationCode[key].CreateAt).TotalSeconds < 59) { return false; }