Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Problem with session token and turbolinks

Solved

Problem with session token and turbolinks

alijesar
Visitor
2 1 0

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 

Accepted Solution (1)

alijesar
Visitor
2 1 0

This is an accepted solution.

Reply 1 (1)

alijesar
Visitor
2 1 0

This is an accepted solution.