[Vuejs]-Laravel/Vue – Sessions on firefox not working correctly (CSRF token mismatch, session data is null, etc)

0👍

Asked this question on r/laravel and it is solved.

It looks like Firefox isn’t sending the session cookie, wich will
cause all the problems you described as a result. Use the browser
developer tools to inspect requests to confirm this. Then, try to
configure Axios to always send cookies, something like
withCredentials: true.

So I added "axios.defaults.withCredentials = true;". And it works! Will keep this here, so others might learn from my mistakes

Leave a comment