I am already having a react SPA which works with backend WebAPI. Currently, I am making an ASP.NET Core MVC Project which has its own view pages, but needs to integrate this app in one page (I will integrate all WebAPI functions to this MVC app as well). Since I am using Cookie based authentication on my ASP.NET Core App, I want my react app to share the same authentication session so that users doesn't need to login again.
Theoretically, everything should work well when I copy the compiled react JS files to my ASP.NET Core scripts folder and run it.
But, The challenge is debugging. When both apps works on different ports, the Authentication cookie is not shared, and my react app will not work (Both CORS and Authentication problem)
How can I run both apps on same port while development?