Questions and discussions about using the Shopify CLI and Shopify-built libraries.
After upgrading our embedded shopify app, to app bridge 2 and JWT session token authentication, our App redirects to login route with the following error after the Approve charges button is clicked on the charge confirmation page
[ShopifyApp::EnsureAuthenticatedLinks] Redirecting to login: [ShopifyApp::LoginProtection::ShopifyDomainNotFound] Could not determine current shop domain
Redirected to https://c2d1-180-92-135-141.ngrok.io/login
Filter chain halted as :redirect_to_splash_page rendered or redirected
Completed 302 Found in 1ms
The Application is a rails app using Turbolinks. We configured the session token authentication according to this article: https://shopify.dev/apps/auth/session-tokens/server-side-rendered-apps
and this sample app: https://github.com/Shopify/turbolinks-jwt-sample-app
To open the confirmation charges page we are using the following code snippet in our app. The method using this snippet is getting data, required by our app, from an ajax call (as JS)
render js: "window.top.location = '#{charge.confirmation_url}';" if charge.save
Using rails 6.0.4.4
shopify_app gem (18.0.3)
Any help regarding this will be appricated
Solved! Go to the solution
This is an accepted solution.
This answer on Github works for me
https://github.com/Shopify/shopify_app/pull/1277#issuecomment-1010768859
This is an accepted solution.
This answer on Github works for me
https://github.com/Shopify/shopify_app/pull/1277#issuecomment-1010768859