Kyon147 / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
363 stars 107 forks source link

Forms using Blade and the @sessionToken directive (still) don't work properly #248

Open SebKay opened 9 months ago

SebKay commented 9 months ago

I recently opened an issue about this, #239. After the v19.2.0 update this appeared to be fixed, however it isn't completely solved.

The problem is now intermittent. It seems to be fixed now when using a redirect helper such as back(), however not when using the redirect()->tokenRedirect() helper.

I've spent some time trying to figure out why, but I couldn't for the life of me figure out why it's happening.

Kyon147 commented 9 months ago

Thanks for submitting and for the initial investigation - I'll take a look over Christmas when I have some time and see if I can find the issue.

Kyon147 commented 5 months ago

Just an update here, I think the issue is host being missed off from the helper. I dont have time to fix at the moment but a short term fix, it to pass the host with the form submit as an input.

<input hidden name="host" value="{{\Illuminate\Support\Facades\Request::get('host')}}">

Ofcourse, like always you must pass host across all pages anyway. So make sure this also is happening.