Answer the question
In order to leave comments, you need to log in
Do I need to enable CSRF for a SPA site?
Good afternoon. There is a front on Vue + Nuxt and a back on Laravel. Sanctum stands as a backing defense. Some POST requests require authorization, some do not. Do I need to set a CSRF token for all requests, or does Sanctum protect users enough?
Important comment: I don't use Laravel Blade.
Answer the question
In order to leave comments, you need to log in
No
UPD: go through the comments to this question Laravel + Nuxt: How to overcome error 419 - CSRF token mismatch?
I think that yes, I'll look at the answers of more experienced ones, since I'm a coder. On laracaste, Laravel Authentication (Breeze, Jetstream, Fortify) is used for spa . There, a project was launched separately on vue and laravel on different ports About storing JWT tokens in browsers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question