Open gil-- opened 3 months ago
I'm facing a similar issue in where I want to grab more customer data from the storefront api but don't seem to have a customer access token available in checkout ui extension. Did you find a way to get it? (Other than building a backend app.)
I'd also like to access the customer access token in the checkout, to retrieve data from customer not accessible in any other way (such as associated metaobjects)
Please list the related package(s)
checkout-ui-extensions
If this related to specific APIs or components, please list them here
Provide a compatible customer access token to run buyer specific storefront api queries - https://shopify.dev/docs/custom-storefronts/headless/b2b#step-3-contextualize-storefront-api-requests
Is your feature request related to a problem? Please describe.
I'd like to retrieve buyer contextualized product data using the Storefront api in checkout.
Describe the changes you are looking for
Surface a useCustomerAccessToken() to include in Storefront api calls within checkout extensions
Describe alternatives you’ve considered
Maybe I'm doing something wrong but I tried https://shopify.dev/docs/api/checkout-ui-extensions/unstable/apis/session-token and it didn't seem to work.