Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Patch EMAIL_TOKEN_LIFETIME expiring early
Tuan Dang62f0b3f6dfa6
diff --git a/backend/src/models/token.ts b/backend/src/models/token.tsindex 5481365a06..9569aee0bc 100644--- a/backend/src/models/token.ts+++ b/backend/src/models/token.ts@@ -18,11 +18,16 @@ const tokenSchema = new Schema<IToken>({},createdAt: {type: Date,- expires: parseInt(EMAIL_TOKEN_LIFETIME),default: Date.now}});+tokenSchema.index({+ createdAt: 1+}, {+ expireAfterSeconds: parseInt(EMAIL_TOKEN_LIFETIME)+});+const Token = model<IToken>('Token', tokenSchema);export default Token;