fix(api): 禁用用户与吊销会话合为一个事务,passkey 签名计数只增不减,引导检查遇到数据库故障返回 503

This commit is contained in:
Lemon-miaow committed 2026-09-25 13:29:52 +08:00
1 parent 88d3dd7121
commit 98295e630e
5 files changed
+164 -19

No files matched your search

+1 -1
View File
@@ -583,7 +583,7 @@ func (f *fakeRepo) DeleteAllPasskeyCredentialsForUser(_ context.Context, userID
func (f *fakeRepo) AdvanceCredentialSignCount(_ context.Context, credentialID string, newSignCount uint32, usedAt time.Time) error {
for id, c := range f.passkeyCreds {
if c.CredentialID == credentialID {
c.SignCount = newSignCount
c.SignCount = max(c.SignCount, newSignCount)
t := usedAt
c.LastUsedAt = &t
f.passkeyCreds[id] = c