Open cody0203 opened 4 years ago
Hello @cody0203 , have you found a solution?
Same issue here
Hello @cody0203 , have you found a solution?
Same issue here
Nah, still stuck in there
Hi @cody0203, I'm experiencing a problem where CookieManager.get('https://linkedin.com') get all cookies but all are with httpOnly=false (even though some of them are differently true). Is that the same for you?
@roeycohen yes. It get only httpOnly=false on android devices.
Hi @cody0203, 10x for answering! Do you know if it means that you can't set httpOnly cookie as well?
Update: setting httpOnly seems to work (at least for android N and above)
Hi @cody0203, 10x for answering! Do you know if it means that you can't set httpOnly cookie as well?
Update: setting httpOnly seems to work (at least for android N and above)
Oh i only need to get it.
ios need get httponly cookie
@hengkx Ios still can get httpOnly cookie, try to use CookieManager.getAll(true).then(...)
.
@hengkx Ios still can get httpOnly cookie, try to use
CookieManager.getAll(true).then(...)
.
Thanks. The simulator can get. the real machine can't get cookies.
Thanks. The simulator can get. the real machine can't get cookies.
Two months ago when i still development my old app, i remember i still can get it in real device. But for now, i can't confirm that, sorry.
Hello, we can confirm that with CookieManager.getAll(true).then(...)
we can get all cookies in iOS, the problem is that there is no such function in Android we are not able to the all the cookies (even the httpOnly ones) on Android devices. Hope there is a solution for that which can make Android & iOS behave the same.
@marf I think this issue become from Android native code, in class CookieManager
, not from this library.
@marf I think this issue become from Android native code, in class
CookieManager
, not from this library.
@cody0203 do you think that in android there is no library which allows this or simply we have to fork CookieManager to allow this kind of behavior the same as in iOS?
@marf I think this issue become from Android native code, in class
CookieManager
, not from this library.@cody0203 do you think that in android there is no library which allows this or simply we have to fork CookieManager to allow this kind of behavior the same as in iOS?
I don't know if any android's library can do it but i have tried to re config CookieManager in android code and nothing happen. In android official docs doesn't mention about this feature too. Sry for my bad English, wish you can understand.
@marf I think this issue become from Android native code, in class
CookieManager
, not from this library.@cody0203 do you think that in android there is no library which allows this or simply we have to fork CookieManager to allow this kind of behavior the same as in iOS?
I don't know if any android's library can do it but I have tried to re config CookieManager in android code and nothing happens. In android official docs don't mention this feature too. Sry for my bad English, wish you can understand.
I am not an English native speaker too :) The only thing I have found is this answer from StackOverflow:
It suggests using reflection, but it is quite old and a comment said that it does not work, so I am not sure if this may be a solution.
@marf I think this issue become from Android native code, in class
CookieManager
, not from this library.@cody0203 do you think that in android there is no library which allows this or simply we have to fork CookieManager to allow this kind of behavior the same as in iOS?
I don't know if any android's library can do it but I have tried to re config CookieManager in android code and nothing happens. In android official docs don't mention this feature too. Sry for my bad English, wish you can understand.
I am not an English native speaker too :) The only thing I have found is this answer from StackOverflow:
It suggests using reflection, but it is quite old and a comment said that it does not work, so I am not sure if this may be a solution.
I tried and it does not work :)
@marf I think this issue become from Android native code, in class
CookieManager
, not from this library.@cody0203 do you think that in android there is no library which allows this or simply we have to fork CookieManager to allow this kind of behavior the same as in iOS?
I don't know if any android's library can do it but I have tried to re config CookieManager in android code and nothing happens. In android official docs don't mention this feature too. Sry for my bad English, wish you can understand.
I am not an English native speaker too :) The only thing I have found is this answer from StackOverflow: Get HttpOnly Cookies Android It suggests using reflection, but it is quite old and a comment said that it does not work, so I am not sure if this may be a solution.
I tried and it does not work :)
Maybe only works for old android version?
@marf I think this issue become from Android native code, in class
CookieManager
, not from this library.@cody0203 do you think that in android there is no library which allows this or simply we have to fork CookieManager to allow this kind of behavior the same as in iOS?
I don't know if any android's library can do it but I have tried to re config CookieManager in android code and nothing happens. In android official docs don't mention this feature too. Sry for my bad English, wish you can understand.
I am not an English native speaker too :) The only thing I have found is this answer from StackOverflow: Get HttpOnly Cookies Android It suggests using reflection, but it is quite old and a comment said that it does not work, so I am not sure if this may be a solution.
I tried and it does not work :)
Maybe only works for old android version?
Not sure but if that true, it's useless :)
Has anyone found a solution?
I've also been stuck on this issue recently. and how to get http-only cookie from response headers
just connect to the webview cookie with sqlite database and read all the data from DB
just connect to the webview cookie with sqlite database and read all the data from DB
what does that mean???
clients shouldnt be able to head http-only cookies--that's quite literally the entire purpose of http-only cookies--preventing client side access.
hi, everyone) you can try to do this, it works for me, but it is for android... CookieManager.get('domain', true).then(...)
Hello guys,
I'm current build a RN app with react-native-webview and @react-native-community/cookies. Now, i need to access all cookies in webview. With some help of @react-native-community/cookies on ios devices, i can get all of this but on android i only get non-secure/non-httpOnly cookies.
Android devices is running on API 28.
Here my code:
<WebView ref={webViewRef} source={{uri: 'https://example.com'}} javaScriptEnabled={true} sharedCookiesEnabled={true} thirdPartyCookiesEnabled={true} />
useEffect(() => { let getCookies = () => CookieManager.getAll(useWebKit).then((cookies) => { console.log('CookieManager.get =>', cookies); }); if (Platform.OS === 'android') { getCookies = () => CookieManager.get('https://linkedin.com').then((cookies) => { console.log('CookieManager.get =>', cookies); }); } getCookies(); }, []);