Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Accessing a user account login via shopify theme dev command

Solved

Accessing a user account login via shopify theme dev command

mikem255
Tourist
5 0 1

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!

Accepted Solutions (3)
Liam
Community Manager
3108 344 895

This is an accepted solution.

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!

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Liam
Community Manager
3108 344 895

This is an accepted solution.

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!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Liam
Community Manager
3108 344 895

This is an accepted solution.

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.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 9 (9)

Liam
Community Manager
3108 344 895

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

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

mikem255
Tourist
5 0 1

The absolute newest one. 

mikem255
Tourist
5 0 1

Current Shopify CLI version: 3.46.5

Liam
Community Manager
3108 344 895

This is an accepted solution.

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!

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Liam
Community Manager
3108 344 895

This is an accepted solution.

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!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

mikem255
Tourist
5 0 1

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.

Liam
Community Manager
3108 344 895

This is an accepted solution.

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.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

mikem255
Tourist
5 0 1

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.

thejokingdev
Shopify Partner
3 0 0

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.

Need some help with your store? Email me at contact@thejokingdev.com