I'm currently developing part of my app where I'm displaying a website in a WebView, I'm debugging the downloaded code in Visual Studio Code.
I'm encountering an issue where cookie storage seems to be completely disabled. Here are the specific problems I'm facing:
Session Cookies Not Being Set: When I log into the website through the WebView, the page simply refreshes but no session cookies are set, requiring repeated login attempts despite successful authentication.
Persistent Cookie Issues: There is also a JavaScript cookie consent bar in the web application. Despite accepting cookies, refreshing the page causes the consent bar to reappear, indicating that the cookies to dismiss the bar are not being saved.
API Call Cookies Not Set: Additionally, I'm observing that no cookies are being set via API calls. In debugging sessions, there are no
Set-Cookie
headers in the responses, although these headers appear when I make the same API calls using Postman.
There are no related console errors, and I'm unsure why this behaviour is occurring.
Has anyone managed to get this working in the past?
Perhaps there's a specific CORS policy change I need to make or something?
I'd be grateful for any insight, thanks! ๐