I’ve a ReactNative utility that follows a session primarily based authentication circulation with server aspect cookies. It already has an online counterpart so the cell has to regulate to this circulation.
The api technique for login
returns this set-cookie
header that may set the safe, http solely cookie for all subsequent requests.
Set-Cookie: auth-session=xxx-yyy-zzz;Model=1;Area=.my.instance.area.com;Path=/;Safe;HttpOnly;SameSite=None
Every of the next requests work as supposed on android and ship the cookie as
Cookie: auth-session=xxx-yyy-zzz
On iOS the cookie duplicates the worth and concatenates it, sending an array
Cookie: auth-session=xxx-yyy-zzz,xxx-yyy-zzz
Undecided what results in this duplication as I don’t alter or intrude with the cookies in any approach. However as a result of this duplication, the server doesn’t authorise these requests and ship a 401 response (which is the proper behaviour, for the reason that session cookie is incorrect).
Mission setup (related packages):
"expo": "~51.0.28",
"expo-dev-client": "~4.0.25",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.5",