Reference in-memory adapter for testing and prototyping.
Stores cookies in a plain array — no persistence across process restarts. Use this as a starting point when building localStorage, Redis, or filesystem adapters.
const plugin = cookiePlugin({ adapter: new MemoryAdapter() }); Copy
const plugin = cookiePlugin({ adapter: new MemoryAdapter() });
Load all persisted cookies. Called at init and optionally before each request.
Persist the full current cookie store. Called after every mutation.
Reference in-memory adapter for testing and prototyping.
Stores cookies in a plain array — no persistence across process restarts. Use this as a starting point when building localStorage, Redis, or filesystem adapters.
Example