验证码使用成功后立即释放发送冷却并保留累计限额

This commit is contained in:
xuans committed 2026-09-18 23:11:46 +08:00
1 parent fe7261ca6c
commit 3b5f378067
6 files changed
+284 -22

No files matched your search

@@ -305,6 +305,11 @@ func TestEmailLoginAfterAsyncDelivery(t *testing.T) {
if code, _ := callLoginHandler(t, CompleteLoginVerification, verify); code == 0 {
t.Fatal("consumed code accepted again")
}
if _, err := currentSecurityRuntime().verification.Issue(verification.IssueRequest{
Purpose: verification.PurposePasswordChange, Account: user.Account, Email: "owner@example.net",
}, "127.0.0.1"); err != nil {
t.Fatalf("登录完成后其他业务无法发送验证码:%v", err)
}
}
func TestLoginMethodsRejectInvalidState(t *testing.T) {