Improve documentation for privateStorefrontToken #2211
patdx
started this conversation in
Ideas + Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been developing with Shopify Hydrogen in Cloudflare Workers and it was quite hard to diagnose that my requests were being throttled, because
console.log(error)
like here, where error is an object and not a plain string, will not show in the Cloudflare logs, so I could not easily see the "Throttled" error message. Once I realized that, I realized the privateStorefrontToken is quite important, but I could not figure out easily how to generate the privateStorefrontToken.I know there is some documentation here.
But I could figure out easily which scopes are needed.
My first attempt to generate a token just caused errors. Eventually I decided to copy the list of scopes from my custom development app:
And came up with this Node.js script to generate the token:
Does this approach seem correct? Did I choose a good list of scopes? It would be great if you could add an easier and clearer way to generate the token to the documentation (like a copy&paste example script) or Shopify CLI, etc.
Beta Was this translation helpful? Give feedback.
All reactions