RN security · Concept
Where to store tokens
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe 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
- "What does Keychain or Keystore actually protect against?"
- "Biometric-gated access?"
- "What leaks tokens accidentally?"
- "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 voicePractise 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.