Accessing a user account login via shopify theme dev command

Using the CLI command shopify theme dev command, I’m unable to log into a customer account to be able to preview/modify those templates. My guess is there’s some kind of authentication/cookie issue since it’s at http://127.0.0.1:9292/ but this is a significant road block for using the CLI for development. Has anyone run into this and found a fix? I want to be able to edit shopify code that utilizes user accounts. Thanks!

Hi Mike - which version of the CLI are you using?

The absolute newest one.

Current Shopify CLI version: 3.46.5

Hi again Mike - I’ve tried this out on my side too and am seeing the same behaviour. I believe this was possible previously, and will connect with the CLI team today to flag this with them. Will update here soon!

2 Likes

Hi again Mike,

So it’s possible to view the customer pages in local dev by disabling the captcha settings at Online Store > Preferences. Then restart your dev server, and you’ll be able to log into customer pages on the locally running instance:

Hope this helps!

2 Likes

Do I have to disable captcha for my live store, or is this somewhere else? Thanks for the clarification and your help in the matter.

Hi Mike,

Correct - you would disable captcha for the connected store (in the store admin settings). If you don’t want to have captcha disabled on a live store, you could set up a development store just for developing your theme (including customer pages), where the captcha protection would be disabled. When you want to populate changes across to the live store (where the captcha protection would still be enabled) you could use the Shopify GitHub Integration and push your changes to a connected GitHub repo.

1 Like

Okay, this is what we are actually planning to do, we’re just waiting for Shopify to tell us our store is finished cloning. Thanks for your help.

1 Like

A simple solution would be to use the preview link generated on the console when you run shopify theme dev and login there. The development work might slow down a bit since you need to refresh the page manually when you make changes, but that’s it.