Home > OS >  Does Expo/React-Native support Cookies and all the security rules around it?
Does Expo/React-Native support Cookies and all the security rules around it?

Time:09-05

A typical web app would have to conform to rules regarding the cookies. But for a mobile app in React-Native or whatever technology of choice that is NOT running a WebView, does it follow the same rules?

(i.e. Origin, CORS, etc)

Or it just bypasses it since it's low-level API calls.

Normally I'd use cookies for simple session management rather than JWT (as noted by the rant) but only on a web app.

CodePudding user response:

The cookies are a bit unstable and there are a couple of issues mentioned in the official documentation (https://reactnative.dev/docs/network#known-issues-with-fetch-and-cookie-based-authentication)

With that said, CORS only matters on browser environments (I think not sure tho - not sure about webviews), JWT is highly preferred because it can be easily maintained.

  • Related