Skip to content

restoreCustomerSessionFromCookie

restoreCustomerSessionFromCookie(cookieValue, shopDomain, now?): Promise<RestoredCustomerSession | null>

Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/customer/restore.d.ts:15

Restore a read-only customer session from the raw _storesynk-customer-session cookie value. Valid unexpired token → the customer profile (fetched with the same isomorphic query the client session uses); anything else → null (anonymous). now is injectable for tests.

string | null | undefined

string

Date

Promise<RestoredCustomerSession | null>