It is very very very annoyed when meet the auth problem in Shopify CLI.
I have the store account and partner account with the same email (Both logged in by Google). I create a new theme for {storename} and I can edit the theme in the website.
However, when I use the shopify CLI in my computer, input
shopify theme dev --store {storename}
it outputs success firstly but finally it says error: I am not authored.
D:\Desktop\shopify\new>shopify theme dev --store {storename}
To run this command, log in to Shopify.
User verification code: NDR--fakePV
? Press any key to open the login page on your browser
Opened link to start the auth process: https://a--------Buser_code%5D=NfakeVPV
โ Logged in.
โญโ info โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ You're using the new version of `shopify theme dev`. โ
โ โ
โ Run `shopify theme dev --legacy` to switch back to the previous version. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ success โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Preview your theme โ
โ http://127.0.0.1:9292 [1] โ
โ โ
โ Next steps โ
โ Customize your theme at the theme editor [2] โ
โ Share your theme preview [3] (https://{storename}.myshopify.com/? โ
โ preview_theme_id=133---61) โ
โ โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
[1] http://127.0.0.1:9292
[2] https://{storename}.myshopify.com/admin/themes/133---561/editor
[3] https://{storename}.myshopify.com/?preview_theme_id=13310----0863561
Error: You are not authorized to edit themes on "{storename}.myshopify.com".
at handleForbiddenError (file:///C:/Users/XU/AppData/Roaming/npm/node_modules/@shopify/cli/dist/index.js:145260:89)
at request (file:///C:/Users/XU/AppData/Roaming/npm/node_modules/@shopify/cli/dist/index.js:145245:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async deleteThemeAsset (file:///C:/Users/XU/AppData/Roaming/npm/node_modules/@shopify/cli/dist/index.js:145210:13)
at async Promise.all (index 1)
Why? please