Skip to content

getRequestCustomer

const getRequestCustomer: (source) => Promise<RestoredCustomerSession | null>

Defined in: @storesynk/react/dist/request.d.ts:32

The request’s logged-in customer from the _storesynk-customer-session cookie. The client customers module mirrors the ACCESS token (never the refresh token) into that cookie; here it restores a READ-ONLY session (one profile fetch per call - restore once per request and thread the result). Expired/absent/garbage cookie or a rejected token ⇒ null (anonymous); never throws.

CookieSource

Promise<RestoredCustomerSession | null>