Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(eng-4868): extend used-TOTP cache TTL to cover full window:1 acceptance span

Tre Dubrava18cc9fd2dc1c
diff --git a/backend/src/keystore/keystore.ts b/backend/src/keystore/keystore.ts
index f0b1eb7c4f..6459a0d520 100644
--- a/backend/src/keystore/keystore.ts
+++ b/backend/src/keystore/keystore.ts
@@ -115,7 +115,7 @@ export const KeyStoreTtls = {
ProjectPermissionDataTtlSeconds: 600, // 10 minutes - longer-lived data payload
MfaSessionInSeconds: 300, // 5 minutes
WebAuthnChallengeInSeconds: 300, // 5 minutes
- UsedTotpCodeInSeconds: 60, // covers the ±30s window with margin
+ UsedTotpCodeInSeconds: 120, // covers the full ±30s acceptance window (window:1 → 90s) with margin
ProjectSSEConnectionTtlSeconds: 180, // Must be > heartbeat interval (60s) * 2
TelemetryIdentifyIdentityInSeconds: 86400, // 24 hours
RefreshTokenGraceInSeconds: 30,