Is it theoretically possible to use cookie/session for user authentication for Laravel front-end and front-end separation projects?

I added withCredentials to my front-end request, even though I deployed the front and back ends separately.

assume that the front end is deployed at web.xxx.com
and that the back end is deployed at service.xxx.com

I define all api as web, so I can authenticate users by setting cookie, and I can temporarily store data in session in back-end code.

Feb.28,2021

is achievable. But should you ask yourself why there is something better not to use?


Yes, as long as you set cookie to be accessible in the subdomain name

Menu