0

We have a Laravel 5.3 (Spark 2.04) app that we use to generate and embed (i-frame) registration/appointment/contact forms.

But in more recent versions of Safari 10.1 (and mobile Safari 10.3.2) we're getting

TokenMismatchException in compiled.php

But this only happens in Safari 10.1 as Chrome & Firefox work fine. And older versions of Safari 10.0.3 also work. I tested on my iPad that has iOS 9.3.5 and the form worked fine.

You view a sample form here: http://www.chrislionkids.com/contact-us/

Just click the Submit button and you'll see the error.


I tried adding the submission URI to exceptions array as per this SO post. https://stackoverflow.com/a/31910532/1337511

But still get the error. It's as if the javascript were blocked in Safari.

Community
  • 1
  • 1
Alex Aguilar
  • 980
  • 5
  • 9

1 Answers1

1

This might be due to how safari handles cross domain cookies with iframe. You might want to check out these resources for further help.

https://github.com/laravel/framework/issues/17615

https://stackoverflow.com/a/43121287/5892849

https://laracasts.com/discuss/channels/general-discussion/csrf-form-token-doesnt-match-session-token/replies/32749

http://anantgarg.com/2010/02/18/cross-domain-cookies-in-safari/

Community
  • 1
  • 1
Sandeesh
  • 11,486
  • 3
  • 31
  • 42