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
Shopify Staff
2731 302 783

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
Shopify Staff
2731 302 783

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
Shopify Staff
2731 302 783

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 8 (8)

Liam
Shopify Staff
2731 302 783

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
Shopify Staff
2731 302 783

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
Shopify Staff
2731 302 783

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
Shopify Staff
2731 302 783

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.