When using Laravel Sanctum, backend and frontend have to be on the same domain. So using different IP addresses won't work.
Aug 30, 2022
4
Level 1
Laravel Sanctum: (Frontend & Backend with different IP Address) Error: Login CSRF Token mismatch
Having csrf token mismatch error in login with Nuxt and Laravel Sanctum. When I change the domains of both app (frontend & backend) into localhost, login works perfectly. But if I set:
FRONTEND_URL=https://127.0.0.11
BACKEND_URL=https://127.0.0.10
CSRF token mismatch error occurs. Is there any workaround?
Please or to participate in this conversation.