Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JuanDBB's avatar

Session expired with Axios calls

With latest versions of Spark and Laravel when I send an Axios call it sends me back to login page (unauthorized error). The only way I have got it working is doing in EncryptCookies.php protected static $serialize = true; and in AppServiceProvider.php error_reporting(E_ALL ^ E_NOTICE); But I don't think this is any good. I have seen many people with this problem, but haven't seen any answer to it.

Thank you in advance

0 likes
1 reply
JuanDBB's avatar

Sorry, solved with latests version of Spark.

Please or to participate in this conversation.