You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've build a simple POC showcasing cookies working with the WkWebView (using this plugin). It works great with the default hostname and scheme (i.e. ionic://localhost). However, after changing the hostname and/or scheme, cookies no longer work.
Here's a the link the REPO with steps on how to reproduce the issue.
Thank you, in advance, for the help.
The text was updated successfully, but these errors were encountered:
Although cookies work with default settings, they are never visible. That is, developers cannot inspect cookies inside of Safari's devtools (under application cookie storage).
Another thing I've noticed is that document.cookie is always empty. I have removed the httpOnly flag from the cookie header sent in the response but it never shows up in document.cookie.
What is even weirder is that if you use Safari's devtools to set a cookie (e.g. document.cookie="foo=bar") it is not set and document.cookie remains empty, meaning JavaScript has no access to any cookies whatsoever.
Can someone please give a clear explanation as to why cookies aren't available in the webview in iOS? I can get cookies to work AND THEY ARE VISIBLE IN DEV TOOLS if I set the hostname setting in capacitor.config.js to the same domain as the requests I'm making BUT the app we're creating is designed to be used with backends located at addresses the user inputs.
I've build a simple POC showcasing cookies working with the WkWebView (using this plugin). It works great with the default
hostname
andscheme
(i.e.ionic://localhost
). However, after changing thehostname
and/orscheme
, cookies no longer work.Here's a the link the REPO with steps on how to reproduce the issue.
Thank you, in advance, for the help.
The text was updated successfully, but these errors were encountered: