Przejdź do głównej zawartości

Interface: StorefrontClientProviderProps

Extended by

Properties

authBasePath?

optional authBasePath?: string

Base path of the auth route handlers used to sync the httpOnly cookie after a reactive refresh (default /api/auth).


botProtection?

optional botProtection?: BotProtectionTokenProvider | null

Bot protection token provider (created by StorefrontProvider)


botProtectionOperations?

optional botProtectionOperations?: string[]

Operations that require bot protection (from shop query)


children

children: ReactNode


config?

optional config?: StorefrontProviderConfig

Client config. apiUrl and shopSlug are optional — when omitted they fall back to NEXT_PUBLIC_API_URL / NEXT_PUBLIC_SHOP_SLUG, so a standard Next.js deploy is zero-config. Pass either value to override the environment.


middleware?

optional middleware?: Middleware[]

Additional middleware to prepend to the default pipeline. Default pipeline: auth → currency → bot-protection → [custom] → retry → timeout → errors


sessionExpiredEmitter?

optional sessionExpiredEmitter?: SessionExpiredEmitter

Auth-level session-expired emitter (from StorefrontProvider). When present, a reactive 401 on a read query triggers a single deduped refresh + replay, while a 401 on a mutation — or a refresh that also fails — fires this emitter.