Files
community-rule/lib/privacyRetention.ts
T
adilallo 46c34a6323 Delete unused login and invite tokens on a daily job, and keep their URLs out of logs.
Expired sign-in, save-progress, email-change, and invitation tokens (and any draft they carry) are cleared by a Cloudron scheduler task. Page timing logs record the path without the query string, and mail failures log a request id instead of an address.
2026-11-10 15:34:33 -07:00

17 lines
597 B
TypeScript

/**
* Periods the privacy policy states. Change a value here, then update
* `docs/privacy-policy-facts.md` so counsel reads the same numbers.
*/
const DAY_MS = 24 * 60 * 60 * 1000;
/** How long a login or save-progress link works. */
export const MAGIC_LINK_TTL_MINUTES = 60;
export const MAGIC_LINK_TTL_MS = MAGIC_LINK_TTL_MINUTES * 60 * 1000;
/** How long an email-change confirm link works. Same window as login. */
export const EMAIL_CHANGE_TTL_MS = MAGIC_LINK_TTL_MS;
/** Workshop inquiries that do not lead to a workshop. */
export const WORKSHOP_INQUIRY_RETENTION_MS = 365 * DAY_MS;