I am using kyon147/laravel-shopify package which is extending from osiset user. The app was already built on another laravel-shopify package that is abandoned now. I have upgraded the package. I fixed all the reported issues.
The problem I am facing is whenever I click on any of the link of the app that is hosted locally. None of the links work. The screen keeps flashing. When I click on the sidebar of shopify all the links work fine.
I have checked X-frame-options' is also set to false using
grep -r 'X-Frame-Options'I tried to Log the session data. The array is empty in that even on homepage but after I use dd in
HomeController`. It returns few values. I have cross-checked log file. The network tab has returns success code 302 for app bridge which means there is no problem as it is only redirecting. Only working links are those, which are not embedded in shopify app. The link
<a class="Polaris-Breadcrumbs__Breadcrumb" href="{{url('/home')}}" data-polaris-unstyled="true">
is not working. But the following link working
<a class="btn btn-lg btn-success" href="https://wyday.com/limelm/signup/" target="_blank" role="button">Sign up on LimeLm</a>
The only difference I found in the Network tab is how the embedded and non-embedding links are redirecting. Following is a non-embedded link
I had made the same mistake in my previous project, but I found a solution for the
Kyon147\laravel-Shopify
package.If you are using the
blade
file then follow this code:Replace the
Route
orURL
link to theURL::tokenRoute
facades.For example:
If you are using the
controller
file then follow this code:Replace the
redirect()->route()
orredirect()
helper toRedirect::tokenRedirect();
facades.