Skip to content
Playground(another site)

bynk.actor.signed_cookie_missing_ttl

Error A SignedCookie actor does not declare a ttl.

A session cookie that never expires is the failure a language should not allow by omission, so ttl is required. It is how long an issued cookie is valid: the browser's Max-Age and the signed expiry both come from it. A stateless cookie cannot be revoked before it expires, so keep it short.

Example

actor User { auth = SignedCookie(secret = "SESSION_KEY"), identity = UserId } // ✗
actor User { auth = SignedCookie(secret = "SESSION_KEY", ttl = 12.hours), identity = UserId } // ✓

In the Book

See also

  • Every code in its category, Actors, on the diagnostic index.
  • bynk explain bynk.actor.signed_cookie_missing_ttl shows the same from the installed toolchain, without a network.