Registers cookie-backed sessions under CAPABILITIES.SESSION, with optional
session-backed form CSRF.
The default is a self-contained encrypted cookie: AES-256-GCM under a key
derived from the secret by HKDF-SHA256, all through runtime.subtle, so there
is no npm dependency and it works on Cloudflare Workers. Setting store moves
the payload server-side and leaves only an opaque id in the cookie, which is
what makes immediate revocation possible.
// Revocable sessions over whichever cache store is registered, with a // rotation list: index 0 seals, both open. SessionPlugin({ secret: [newSecret, oldSecret], store:'cache', mode:'sign', rolling:true, });
Registers cookie-backed sessions under
CAPABILITIES.SESSION, with optional session-backed form CSRF.The default is a self-contained encrypted cookie: AES-256-GCM under a key derived from the secret by HKDF-SHA256, all through
runtime.subtle, so there is no npm dependency and it works on Cloudflare Workers. Settingstoremoves the payload server-side and leaves only an opaque id in the cookie, which is what makes immediate revocation possible.