Skip to main content
tokens holds one-time tokens: the secret in a link that lets someone set a password. One document is one token. There is no Mongoose model; web writes the collection through services/web/app/src/Features/Security/OneTimeTokenHandler.mjs with the native driver.

Fields

Uses

Who Writes It

Who Reads It

Indexes

Migrations are in tools/migrations/.

Notes

  • A used or expired token is not deleted at once: it stays, with usedAt or a past expiresAt, until the TTL index removes it 90 days after createdAt.
  • OneTimeTokenHandler also has getValueFromTokenAndExpire (OneTimeTokenHandler.mjs:51-73), but nothing calls it.
Last modified on November 14, 2026