Reputation: 684
I'm trying to setup a laravel api to work with a vue spa. API endpoints protected with auth:sanctum
middleware only work when I add web
middleware to them, which I don't think is right. Please help
Upvotes: 2
Views: 155
Reputation: 684
False alarm, I had forgotten to add
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
in app/Http/Kernel.php
Upvotes: 1