Skip to the page

RN security · Concept

Where to store tokens

The interviewer asks

Where should you store auth tokens in a React Native app, and why not AsyncStorage? Should the access token persist at all?

Then

Follow-ups the interviewer asks next

  1. "What does Keychain or Keystore actually protect against?"
  2. "Biometric-gated access?"
  3. "What leaks tokens accidentally?"
  4. "Rooted device?"

The answer

What a strong answer covers

  • AsyncStorage is unencrypted plain files. Use iOS Keychain and Android Keystore / EncryptedSharedPreferences via react-native-keychain or expo-secure-store.
  • Refresh token in secure storage. Access token in memory, short-lived.
  • Leaks: persisted Redux in AsyncStorage, logs, crash-report breadcrumbs, deep-link URLs.
  • Secure storage raises the bar but doesn't defeat a rooted device, so pair it with server checks.

The red pen

Common traps

Avoid:"encrypt with a key hard-coded in JS".

Practise this out loud

Say your answer out loud to an AI interviewer that follows up, and get a score for it.

Practise by voice

Practise questions like this out loud

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview