May 12, 2025
0
Level 1
How to authenticate Laravel Cookie based authentication in react hosted in deferent domains
I need some guidance with React. When building a Single Page Application (SPA) using React and Laravel, which authentication method is recommended? Should I use cookie-based session authentication or token-based authentication?
The solution should also support cross-domain . I’ve noticed that Laravel Sanctum’s cookie-based authentication doesn’t work properly across different domains. Given this, would token-based authentication be a better option for web applications? I’d appreciate your suggestions.
Please or to participate in this conversation.