php - Laravel Sanctum | ReactJS | SPA Auth Issue

one text

Solution:

adding correct SANCTUM_STATEFUL_DOMAINS domain with a port number should fix the issue.

In my case, my laravel instance is running at 127.0.0.1:8001 and add this to .env solved my problem

Source