What is the default ttl for a token from Login?

I noticed that ttl is optional in the Login function. What is the default value? What is the maximum value?

The ttl field is optional for all documents, including the Token documents that are created by a successful Login call .

When ttl is not set:

  • The ttl field is not stored in a document, and so the “default” is, effectively, null.
  • The document exists indefinitely.

When ttl is set:

  • The ttl field holds a Timestamp. The maximum value is 9999-12-31T23:59:59.999999999Z.
  • When the ttl’s timestamp has been passed, attempting to read the document behaves as if the document no longer exists even though it persists.

Document removal is handled by a background task that runs on an erratic schedule, or not at all. So there is currently no guarantee that setting ttl actually removes a document. We are working to address that (no ETA is available).

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.