gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

Shopify redirect error on install with prefix #955

Closed Casdak7 closed 3 years ago

Casdak7 commented 3 years ago

For bug reporting only! If you're posting a feature request or discussion, please ignore.

Expected Behavior

For the Install to pass a redirect url using the prefix setup in the config file.

Current Behavior

When Install is clicked, a url with the redirect url of only "/authenticate" is passed. I used the prefix "shopify" so shopify throws an error, seeing as the url that's whitelisted is "/shopify/authenticate". If I manually change the query paramater to "/shopify/authenticate" then the installation is successful.

Failure Information

This seems like a simple fix, but I could be wrong. On generating the url for the authentication callback it would just need to prepend the prefix before the "/authenticate".

Steps to Reproduce

  1. Setup a prefix in the config file
  2. Include the prefixed route in shopify app information
  3. Click to Install the app.

Context

Casdak7 commented 3 years ago

I just found the SHOPIFY_API_REDIRECT in the config, so this is not really an issue, but perhaps should be made more explicit in the docs that it does not take into account the prefix (or to use the prefix before it).