Skip to content

Recipes

Muhammet Şafak edited this page Jun 10, 2026 · 1 revision

Recipes

Practical, copy-pasteable patterns built on top of the public API. Each recipe is self-contained and links back into the reference material for the methods it uses.

Recipe Solves
Remember Me A long-lived signed login token — store an opaque selector/validator in the cookie, keep authority server-side.
Flash Messages One-time post-redirect messages using pull() and a short per-key TTL.
Consent Cookie A long-lived cookie-consent / preference flag that gates analytics and supports withdrawal.

If you have built something on top of the package that other users might benefit from, please open an issue with a sketch — recipe contributions are welcomed.

Before you reach for a recipe

Every recipe rests on the same two rules:

  • The client can read the cookie. Store opaque references, never secrets. See the Security Model.
  • Nothing is written until send(). Issue, refresh, and delete all require a send() before output. See Sending & Lifecycle.

See also

Clone this wiki locally