react-native-cookies icon indicating copy to clipboard operation
react-native-cookies copied to clipboard

[Question] Can it read HttpOnly cookies?

Open gazpachu opened this issue 6 years ago • 2 comments

I'm asking because I tried (without this library) to get an HttpOnly cookie injecting "window.postMessage(document.cookie)" in the injectedJavaScript attribute of a website loaded in a WebView and I got back all the cookies except the ones with HttpOnly set to true.

Thanks!

gazpachu avatar Aug 01 '17 12:08 gazpachu

Mentioned in https://github.com/joeferraro/react-native-cookies/issues/15#issuecomment-310502297

if(Platform.OS === "ios") {
  cookies = { "Set-Cookie": response.headers.get('set-cookie') };
} else {
  cookies = response.headers.get('set-cookie');
}

iegik avatar Aug 29 '17 14:08 iegik

It can read http only cookies

ratbeard avatar Aug 03 '18 15:08 ratbeard