# React Native and Expo App Security in 2026: A Practical Checklist Based on OWASP MASVS

*Where mobile apps actually leak data, and the concrete steps to secure an Expo or React Native app: secrets, storage, network, authentication, backend access, deep links, updates and dependencies.*

most React Native security failures aren't exotic attacks. They're secrets shipped inside the app, tokens stored in plain text, backends that trust the client, unvalidated deep links and outdated dependencies. Treat the app as public code running on a device you don't control: keep secrets on the server, store tokens in encrypted storage, enforce authorization in your backend, validate every input that arrives from outside, sign your over-the-air updates and keep dependencies current. The checklist below follows the OWASP Mobile Application Security Verification Standard (MASVS).

## What is mobile app security, and why is React Native different?

Mobile app security is protecting user data and your backend from anyone who can install, inspect or tamper with your app. **The key difference from web apps:** your app's code is delivered to the attacker. Anyone can download it, unpack it and read its JavaScript bundle, configuration and network requests.

That changes the rule for everything below: **the app can't keep secrets, and the server can't trust the app.**

## What is OWASP MASVS?

The **OWASP Mobile Application Security Verification Standard (MASVS)** is the industry standard for mobile app security. It groups requirements into areas: storage, cryptography, authentication, network, platform interaction, code quality, resilience and privacy. Its companion, the **Mobile Application Security Testing Guide (MASTG)**, explains how to test each one. This article maps those areas to concrete steps for Expo and React Native.

## 1\. Are there secrets in my app bundle? (MASVS-CODE, MASVS-STORAGE)

**If a key is in your app, it's public.** Your JavaScript bundle can be extracted from the installed app with ordinary tools, and every string in it can be read.

That includes **every** `EXPO_PUBLIC_` **environment variable**: they're inlined into the bundle at build time.

**Safe in the app:**

- Publishable or anonymous keys designed to be public (Supabase anon key, Stripe publishable key, Firebase config), **as long as your backend enforces access**.

**Never in the app:**

- Service role keys, secret API keys (Stripe secret key, OpenAI or other AI provider keys), database passwords, private signing keys.

**How to fix it:** move every call that needs a secret into a backend endpoint or serverless function (for example a Supabase Edge Function), and have the app call that endpoint with the user's session. Add a check to CI that fails if suspicious names appear in public variables:

```bash
# Fail the build if a secret-looking name is exposed to the app
if grep -E "EXPO_PUBLIC_.*(SECRET|SERVICE_ROLE|PRIVATE)" .env* app.config.* 2>/dev/null; then
  echo "Secret exposed in an EXPO_PUBLIC_ variable" && exit 1
fi
```

And run a secret scanner such as gitleaks on your repository, since secrets also leak through commits.

**If a secret has already shipped:** rotate it immediately. Removing it from the next version doesn't help; old versions stay on users' phones.

## 2\. Where should I store tokens and sensitive data? (MASVS-STORAGE)

**Use encrypted platform storage for anything sensitive.** On iOS that's the Keychain, on Android the Keystore, both available through `expo-secure-store`.

- **AsyncStorage is unencrypted.** Fine for theme or language settings, not for tokens.
- **SecureStore** is designed for small values like tokens and keys.
- **For larger sensitive data** (like a full auth session), encrypt it with a key kept in SecureStore and store the ciphertext elsewhere.

```ts
import * as SecureStore from 'expo-secure-store';

await SecureStore.setItemAsync('refresh_token', token, {
  keychainAccessible: SecureStore.WHEN_UNLOCKED,
});
```

**Also check:**

- **Logs.** Never `console.log` tokens, passwords or personal data. Release builds can still expose logs through device tools and crash reporting. Scrub sensitive fields before sending errors to your crash reporter.
- **Backups.** On Android, app data can be included in device backups. If your app stores sensitive data, consider disabling backup in your app config (`"android": { "allowBackup": false }`) and make sure that suits your users.
- **Clipboard and screenshots.** Don't copy secrets to the clipboard automatically, and for very sensitive screens (banking details, one-time codes) consider preventing screenshots with `expo-screen-capture`.

## 3\. Is my network traffic protected? (MASVS-NETWORK)

**Use HTTPS for everything.** Both platforms help by default: iOS App Transport Security blocks plain HTTP, and Android blocks cleartext traffic for apps targeting modern API levels. Don't add exceptions unless you truly need them, and never for production APIs.

**What about certificate pinning?** Pinning makes the app trust only your server's specific certificate, which blocks some interception attacks. It also means a certificate change can lock every user out until they update. For most apps, standard HTTPS plus strong backend authorization is the right balance; pinning makes sense for high-risk apps (finance, health) with a plan for rotating pins.

**Don't put secrets in URLs.** Query strings end up in logs, analytics and browser history. Send tokens in headers.

## 4\. Is authentication done safely? (MASVS-AUTH)

- **Use a proven auth provider** rather than building your own password handling.
- **Use short-lived access tokens with refresh tokens,** so a leaked token stops working quickly.
- **Use the PKCE flow for OAuth and magic links,** so tokens never travel in redirect URLs.
- **Verify tokens on the server** for every request; never trust a user ID sent by the app.
- **Sign out properly:** end the session, delete stored tokens and clear cached data.
- **Offer biometric unlock as a local gate** in front of an existing session, not as a replacement for authentication.
- **Rate-limit login and code verification** on the server to stop guessing attacks.

## 5\. Does my backend trust the app? (the most common real breach)

This isn't a mobile setting, but it's where most mobile data leaks happen. **Every request can come from someone who isn't using your app**, with modified data, against any endpoint.

- **Authorize every request on the server.** Check that the signed-in user is allowed to read or change *that specific record*.
- **If you use Supabase or Firebase from the app directly,** your database rules are your authorization. In Supabase, enable **Row Level Security** on every table with policies based on `auth.uid()`; in Firebase, write Security Rules for every collection.
- **Calculate prices and permissions on the server.** Never accept an amount, role or "isPremium" flag from the app.
- **Validate input on the server,** even if the app already validates it.

A quick test: sign in as user A, take their token and try to read or change user B's data with a direct API request. It should fail every time.

## 6\. Are deep links and incoming data validated? (MASVS-PLATFORM)

Deep links, universal links and push notification payloads are **input from outside your app**. Anyone can craft a link like `myapp://payments/confirm?amount=0`.

- **Only allow routes you expect.** Validate paths and parameters before navigating.
- **Never perform an action just because a link was opened** (payments, deletions, permission changes). Show a confirmation screen and check authorization on the server.
- **Prefer universal links and app links** with your own domain over custom URL schemes for anything sensitive, since only your app can claim your verified domain.

```ts
const ALLOWED = [/^\/orders\/[\w-]+$/, /^\/settings$/];

export function safeRoute(url: string) {
  return ALLOWED.some((re) => re.test(url)) ? url : null;
}
```

## 7\. Are WebViews safe? (MASVS-PLATFORM)

If your app uses `react-native-webview`:

- **Load only your own trusted URLs,** and restrict navigation with `originWhitelist` and `onShouldStartLoadWithRequest`.
- **Don't expose powerful native functions** to web content through `postMessage` handlers without validating every message.
- **Avoid injecting tokens into web pages** you don't fully control.

## 8\. Are my over-the-air updates protected? (MASVS-CODE)

OTA updates change your app's code without a store review, so they must come only from you.

- **Protect the credentials** that can publish updates (your Expo account and CI tokens) with two-factor authentication and least-privilege access.
- **Consider code signing for EAS Update.** Expo supports signing updates with your own key, so the app rejects any update not signed by you. The `expo-updates` package includes a command to generate the key and certificate, and your app config references the certificate.
- **Keep OTA for fixes and small changes** within what App Review approved.

## 9\. Are my dependencies safe? (MASVS-CODE)

Every package you install runs with your app's full access.

- **Keep dependencies current,** especially those with native code. Upgrade your Expo SDK regularly.
- **Run audits** (`npm audit` or your package manager's equivalent) and review the results; not every finding is exploitable, but critical ones in runtime packages deserve attention.
- **Commit your lockfile** and use exact versions from it in CI.
- **Review every new package** before adding it: maintainers, downloads, last release. AI coding tools sometimes suggest packages that don't exist; attackers register such names hoping someone installs them.
- **Remove unused packages.** Less code means fewer vulnerabilities.

## 10\. What about code obfuscation and root detection? (MASVS-RESILIENCE)

These make reverse engineering harder, but they **don't make insecure code secure**. Hermes bytecode and Android R8 obfuscation raise the effort for attackers, which is useful, but assume a determined attacker will still read your app.

Root and jailbreak detection can be bypassed and can block legitimate users. Use them only where your risk model requires it (often finance or games with real-money stakes), and never as a replacement for server-side checks.

## 11\. Does my app respect privacy? (MASVS-PRIVACY)

- **Collect only what you need,** and request permissions when a feature is used, not at launch.
- **Write clear permission messages** explaining why.
- **Keep your App Store privacy labels, Google Play Data safety form and privacy policy accurate,** including what your SDKs collect.
- **Let users delete their account and data** from inside the app; both stores require it.

## The React Native security checklist

1. No secret keys in the app or in `EXPO_PUBLIC_` variables; CI check and secret scanning in place.
2. Tokens in SecureStore; no sensitive data in AsyncStorage, logs or crash reports.
3. HTTPS everywhere, no cleartext exceptions for production.
4. Proven auth provider, short-lived tokens, PKCE, server-side verification.
5. Server-side authorization on every request (RLS or security rules for direct database access).
6. Deep links and notification payloads validated; no actions on open.
7. WebViews restricted to trusted content.
8. Publishing credentials protected; OTA updates code-signed where possible.
9. Dependencies current, audited, reviewed and minimal.
10. Privacy declarations accurate; account deletion available.

## Frequently asked questions

### Is it safe to put API keys in a React Native app?

Only keys designed to be public, like a Supabase anon key or Stripe publishable key, and only when your backend enforces access rules. Secret keys must stay on your server, because anything in the app can be extracted.

### Is AsyncStorage secure?

No. AsyncStorage stores data unencrypted. Use it for non-sensitive settings, and use Expo SecureStore (Keychain and Keystore) for tokens and secrets.

### Do I need certificate pinning?

Most apps don't. HTTPS plus strong server-side authorization covers the common risks. Pinning helps high-risk apps but requires a plan for certificate rotation, or users can be locked out.

### Does obfuscation protect my app?

It slows attackers down but doesn't stop them. Assume your app's code can be read, and keep all secrets and security decisions on the server.

### What is the most common React Native security mistake?

Trusting the client: shipping secret keys in the app and backends or databases that don't check whether the user is allowed to access the data they request.

### Where can I learn more?

The OWASP MASVS and MASTG are the standard references for mobile app security, with detailed requirements and testing guides for each area.

## Conclusion

React Native app security comes down to one idea: the app is public, so the server decides. Keep secrets off the device, store tokens in encrypted storage, authorize every request on the backend, validate everything that arrives from outside, protect your update pipeline and keep dependencies current. Work through the checklist once, then add it to your release process so every version stays secure.

If you're starting a new app, [RapidNative](https://www.rapidnative.com?utm_source=hashnode&utm_medium=referral&utm_campaign=react-native-security-checklist&utm_content=conclusion) generates standard Expo projects you can export, review against this checklist and build on.

*Which item on this checklist do most apps you've seen get wrong? Share it in the comments.*
