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; }