Hi, I'm trying to do a connection between my SPA (VueJS) with my api (Laravel 7). I configured my kernel.php as the official documentation says:
Importing: Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful;
Adding: EnsureFrontendRequestsAreStateful::class
Following the steps, I configured CORS policy, then I config my axios request.
The problem is, when I do my request to '/sanctum/csrf-cookie' I got "GET http://localhost:8000/api/sanctum/csrf-cookie 404 (Not Found)"
If I change the URL request to http://localhost:8000/sanctum/csrf-cookie then it return me the cookie
I can do request api route without the cookie, this can not be possible if I have Sanctum for SPA authentication right?
Seems like Sanctum works only with web.php and not with api.php
I hope you can help me, thanks!