Skip to main content
InterviewHubPRO
Section Overview
Q46

Question 46 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

92%
React Native & Expo (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

Biometric Authentication & Secure Storage: Keychain and KeyStore.

senior LevelMost AskedCode ExampleSecurity & Auth

In Simple Words: Never store JWT refresh tokens or passwords in unencrypted AsyncStorage or MMKV:

  • iOS Keychain & Android KeyStore: Hardware-encrypted security enclaves.
  • Biometric Binding: Use react-native-keychain with biometric flags:
    typescript
    await Keychain.setGenericPassword('auth_token', token, {
      accessControl: Keychain.ACCESS_CONTROL.BIOMETRY_ANY,
      accessible: Keychain.ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,
    });
    
  • Hardware automatically prompts for FaceID / TouchID / Fingerprint before returning the secret token to JavaScript.