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

cookie may not stored to device when using RND

Open KingAmo opened this issue 5 years ago • 3 comments

we use cookie to store token, when a http response header has set-cookie, the value may not be stored to device when using RND, then following request can not take the cookie with token, and i come to no authentication; while everything is fine when disable debugging

React Native Debugger app version: 0.10.5 React Native version: 0.61.5 Platform: iOS Is real device of platform: No Operating System: macOS

KingAmo avatar Dec 25 '19 03:12 KingAmo

i use react-native-cookie-store to get the cookie in the device

// Get cookies as a request header string
CookieManager.get('http://example.com')
  .then((res) => {
    console.log('CookieManager.get =>', res); // => 'user_session=abcdefg; path=/;'
  });

KingAmo avatar Dec 25 '19 03:12 KingAmo

https://github.com/electron/electron/releases/tag/v7.1.10 electron v7.1.10 fix set-cookie issue , wait for upgrate to v7.1.10

KingAmo avatar Jan 31 '20 02:01 KingAmo

When device is connected to RND, set-cookies header becomes lost.

seancheung avatar Nov 30 '20 18:11 seancheung