Electron set-cookies HTTP header

990 Views Asked by At

I have been creating an ASP app and experimenting with bundling it with Electron.NET.
The app works, the ASP controllers are all returning fine on localhost:8001, but none of the request are setting the cookies.
My app allows the user to login, so on first instance the authentication cookie is set on the server, then in each subsequent request each controller queries the user claims.

How do we set the cookie policy in Electron to allow all cookies?
I suspect this might be todo with SameSite attribute is that correct?

I have seen Electron set cookie and this seems along the right lines, but I am still none the wiser.

EDIT

I should mention that my client app is using Blazor web assembly, so I am using HttpClient class and I am calling SetBrowserRequestCredentials(BrowserRequestCredentials.Include) on the HTTPRequestMessage tthat should be handling Access-Control-Allow-Credentials.
This is probably really important information that I should of included in the first place.

0

There are 0 best solutions below