You can start by checking the stuff here https://laracasts.com/discuss/channels/laravel/laravel-sanctum-app-only-working-on-mozilla
Sanctum Error
why sanctum only working in Firefox and not chrome?
@Sinnbeck I have checked so many times but it still not working
@karwan and your problem is exactly the same? It works on your local machine but on production it fails? And it's run on different sub domains? And the same error?
@Sinnbeck I didn't tried on production but even when I want to register a new user not working but on Firefox there is no problem
@karwan then tell us about the set up. What urls are you running the sites on? How did you set up sanctum?
@Sinnbeck url(localhost:8000)
SANCTUM_STATEFUL_DOMAINS=localhost,localhost8080,localhost:3000,127.0.0.1,127.0.0.1:8000,::1
SESSION_DOMAIN=localhost
'paths' => ['api/*', 'sanctum/csrf-cookie','login','logout'],
'supports_credentials' => true,
@karwan I'm using similar setup and it works fine.
localhost:8000 my laravel api localhost:8080 is vuejs frontend.
SESSION_DOMAIN=localhost
SANCTUM_STATEFUL_DOMAINS=localhost,127.0.0.1,127.0.0.1:8000,::1,localhost:8080,localhost:8000
In my frontend;
import axios from 'axios'
axios.defaults.withCredentials = true
@Xuma really! maybe I made mistake but don't know where is it
@karwan I don't see localhost:8000 in your stateful domains.
@xuma you are right and also I missed the : between localhost:8080 thanks alot many times I tired and gave up because this miss spelling
Please or to participate in this conversation.