Skip to content

cookieAdapter

cookieAdapter(options?): StorageAdapter

An opt-in adapter for a host that renders on a server and wants it to be able to read the cart: a first-party cookie (SameSite=Lax, Secure on https, Path=/). A cookie carries no change event, so another tab is noticed through the Cookie Store API where the browser has it, and otherwise on that tab’s next cart action. List it in your cookie notice as strictly necessary. The cart token is a secret, so do not give a cookie this adapter writes a wider path or domain than your shop needs.

CookieAdapterOptions = {}

StorageAdapter