Using localhost:3000 I was able to install the shopify store and interact with it. However, when deploying it into production, which is in a subdirectory (www.website.com/app_name), the "login" for the shop is redirected to root and not to the subdirectory. I whitelisted the redirect urls in the shopify app dashboard.
In omniauth.rb
callback_url: "http://{domain}/{app_name}/auth/shopify/callback"
In routes.rb
mount ShopifyApp::Engine, at: '/{app_name}'
Apart from the code above, the settings for shopify are the ones that the generator created. Any ideas in how to fix this?
Tanks!
When I did that pattern I had to set the prefix for OmniAuth... in my old config.ru that works for this.. see..
use OmniAuth::Builder do
# allow us to connect this App via the /fooblefuzz route instead of just
the root of the heroku app URL /
configure do |config|
config.path_prefix = '/fooblefuzz/auth'
end
So this code works as https://www.example.com/fooblefuzz/auth/shopify/callback
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.