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

shez1983's avatar
Level 23

sanctum - with vue - axios not returning correct cookie?

I have looked at laravel doc and also this helpful tutorial: https://codecourse.com/articles/setting-up-laravel-sanctum-airlock-for-spa-authentication-with-vue/

what seems to be happening is when i do the login call after sanctum request, axios header that is sent has both XSRF cookie and session cookie value (which was sent after sanctum request).. which doesnt make sense.. :/

and thus i am getting csrf mismatch..

https://i.ibb.co/cy95grq/Screenshot-2024-05-22-at-20-44-59.png

0 likes
0 replies

Please or to participate in this conversation.