#csrf token mismatch | using breeze
1 messages · Page 1 of 1 (latest)
yeah same
im using my frontend at 127.0.0.1:3000 or localhost:3000
why 5173 and other things
i tried another sultion now it works for localhost: but not for 127.0.0.1:3000
damn
because in my project the frontend port is 5173, delete the ones you don't need.
try with this in your .env file
APP_URL=http://localhost:8000
FRONTEND_URL=http://localhost:3000
SANCTUM_STATEFUL_DOMAINS=localhost,localhost:3000,127.0.0.1:3000,127.0.0.1,127.0.0.1:8000,::1
SESSION_DOMAIN=localhost
check the cors.php file :'supports_credentials' => true
Are you using axios for the frontend?
if it yes
import axios from "axios";
axios.defaults.withCredentials = true;
const api = axios.create({
baseURL: http://localhost:8000,
withXSRFToken: true
})
and in your browser use http://localhost:3000
told u that's working
how to close this post
I understood that it did not work for you on 127.0.0.1:3000, anyway add the tag solved for close the post