shopify-app-template-node icon indicating copy to clipboard operation
shopify-app-template-node copied to clipboard

why we need defined the shop in .env for public app

Open adventuretocode opened this issue 3 years ago • 3 comments

Issue summary

does we have defined the SHOP="my-shop-name.myshopify.com" for public app

Write a short description of the issue here ↓

Expected behavior

does shopify used shop parameter?

What do you think should happen?

Actual behavior

What actually happens?

Tip: include an error message (in a <details></details> tag) if your issue is related to an error

Steps to reproduce the problem

.env
remove the SHOP config

Reduced test case

The best way to get your bug fixed is to provide a reduced test case.

Specifications

  • Browser: Chrome
  • Device: HP
  • Operating System: Ubuntu

@paulomarg

adventuretocode avatar Nov 04 '22 06:11 adventuretocode

@adventuretocode I'm assuming you're asking what the SHOP parameter is used for, Shopify uses this for authentication. If you do not have this parameter, Shopify does not know which shop to generate the OAuth token for. If you are trying to develop an app for multiple shops this parameter must be dynamically retrieved from the request object.

Michael-Gibbons avatar Nov 18 '22 19:11 Michael-Gibbons

@adventuretocode I'm assuming you're asking what the SHOP parameter is used for, Shopify uses this for authentication. If you do not have this parameter, Shopify does not know which shop to generate the OAuth token for. If you are trying to develop an app for multiple shops this parameter must be dynamically retrieved from the request object.

no please refer the .env file.

adventuretocode avatar Nov 21 '22 07:11 adventuretocode

@adventuretocode The template obtains the shop parameter from the incoming request and does not use a .env file.

What code is looking for a SHOP environment variable?

mkevinosullivan avatar Mar 21 '23 19:03 mkevinosullivan