bug: Capacitor 4.3 Http/Cookies: document.cookie is not accessible (deletion)
See original GitHub issueFirst of all, thank you for putting so much effort into Capacitor. With CapacitorCookies and CapacitorHttp it is now easily possible to run an app connected to an API locally.
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 4.3.0
@capacitor/core: 4.3.0
@capacitor/android: 4.3.0
@capacitor/ios: 4.3.0
Installed Dependencies:
@capacitor/cli: 4.3.0
@capacitor/core: 4.3.0
@capacitor/ios: 4.3.0
@capacitor/android: 4.3.0
Platform(s)
iOS, Android
Description
Capacitor Http/Cookies should provide the possibilty to handle document.cookie
. This is necessary for many libraries, for example to delete cookies. A logout is also not possible from the app, when using cookies for authentication.
document.cookie = "auth=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Capacitor Cookies Plugin API
The Capacitor Cookies API provides native cookie support via patching `document.cookie` to use native libraries.
Read more >Cookies on localhost with explicit domain - Stack Overflow
When working on localhost , the cookie domain must be omitted entirely. You should not set it to "" or NULL or FALSE...
Read more >SameSite cookies explained - web.dev
Learn how to mark your cookies for first-party and third-party usage with the SameSite attribute. You can enhance your site's security by ...
Read more >[Solved]-Xcode8 Controllers are Grey which are designed in Xcode ...
How can I fix "Freeform Size simulated metrics are not available prior to Xcode 4.2" warnings? ... xcode error Unable to find a...
Read more >Asynchronous Access to HTTP Cookies - Chrome Developers
The Cookie Store API exposes HTTP cookies to service workers and offers an asynchronous alternative to document.cookie . The API makes it easier ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@malte94 Yes, this should handle 3rd party libraries modifying cookies since every
document.cookie
call will get proxied through the native layer if it is enabled in the config. As far as Cookie based authentication (3rd Party Cookies), Capacitor should also intercept anySet-Cookie
response headers and handle them accordingly on the native platforms 😄 If you encounter an issue though, please create a reproduction and I can investigate it.Hello, Capacitor 4.3 should handle
document.cookie
for you, as long as you enable it in the configuration. See: https://capacitorjs.com/docs/apis/cookies#example-configuration