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
The CapacitorCookies plugin for ios splits the cookies by ;. But the document.cookies has space between each one.
For example:
Some of the 3rd party library based on cookies split this string by ; with the space and CookiesManager does not return it correctly.
I think this is bug/not a bug becase for some reason the CookiesManager splits it like this by default.
Most popular libs like NPM Cookie also based on ; (with space).
Here is also the code of 3rd lib which we debugged and found the problem with CookieManager:
Expected Behavior
My proposal is to add to the CapacitorConfig (into Cookies plugin) new property like separator eg:
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
Platform(s)
iOS (Android and Web works fine)
Plugin:
CapacitorCookie
Current Behavior
The CapacitorCookies plugin for ios splits the cookies by
;
. But thedocument.cookies
has space between each one.For example:
Some of the 3rd party library based on cookies split this string by
;
with the space and CookiesManager does not return it correctly.I think this is bug/not a bug becase for some reason the CookiesManager splits it like this by default.
Most popular libs like NPM Cookie also based on
;
(with space).Here is also the code of 3rd lib which we debugged and found the problem with CookieManager:
Expected Behavior
My proposal is to add to the CapacitorConfig (into Cookies plugin) new property like
separator
eg:to manage separator by your self.
The code with are responsible for this is here: https://github.com/ionic-team/capacitor/blob/main/ios/Capacitor/Capacitor/Plugins/CapacitorCookieManager.swift#L91
Code Reproduction
Other Technical Details
npm --version
output:node --version
output:pod --version
output (iOS issues only):Additional Context
The text was updated successfully, but these errors were encountered: