I'm just wondering if anyone knows how the Blazor Web App with .NET 8.0 handles set-cookies that we get from a backend api server. I know that if we are using Blazor WASM, cookies received from backend are automatically handled by the browser, and if you are on different domain which in this case frontend and backend are different domain, we can use Reverse proxy to transform the headers before sending it to the client. But even after using reverse proxy and putting both the backend and frontend on the same domain, just different path, the cookies received from backend are not stored on the client browser automatically. Plus, I couldnt find a tag for Blazor Web App on stack overflow haha.
I looked and searched quite alot and I tried quite a lot of methods. this includes setting
Access-Control-Allow-Origin: https://localhost:mylocalhost
Access-Control-Allow-Credentials: true
on the backend did not solve the issue. I am working on the Frontend part. I created a login page and send the username, password along with other needed variables using api to the backend for authentication, and after successful authentication the backend will send me a success code along with a Set-Cookie variable. Here is where i stuck, Again, I tried reverse proxy, cors, same domain, change the origin from '*' to my localhost on the backend and still the cookies are still not appearing on the application tab of the developer tools. Which makes me wonder if this is possible at all or Blazor Web App have a different method to handling cookies from backend?