Some time ago I decided to make a .NET 6 web application using the "ASP.NET Core with React.js". I have a company-enforced SSO which on authenticating is saving all the claims in the cookie. The problem is if I have the .NET application on port 44497, and the React app on 44496 then the React app is unable to access the cookie. When I deploy into Azure everything acts as if it works on one port, which means that this problem will not be appearing.
But how do I handle that when developing the application on localhost?
After some close cooperation with a fellow front end developer we discovered that the best problem to solve this issue will be to:
"proxy": "https://localhost:44497/"
And this apparently solved our cookie problem.