All guides
Every guide by the task it answers: sign-in with Face ID, the key of an encrypted database, reinstalls, sharing with other apps, iCloud Keychain and tests.
Guides take one task from start to finish, in your app: which protection to choose, where each piece of code goes, what the user sees, and what to do when a step fails.
If you are new to the package, read the Quick start and Protection first: the guides build on keychain, createKeychain and the options of an item.
Sign-in and sessions
| I want to… | Guide |
|---|---|
| Let the user back in with Face ID or a fingerprint, after a password or SSO sign-in | Sign-in with Face ID |
| Keep a fallback for a cancel, a lockout or changed biometrics | Sign-in with Face ID |
| Rotate the refresh token after every refresh without a prompt | Sign-in with Face ID |
Data and devices
| I want to… | Guide |
|---|---|
| Encrypt MMKV or SQLite with a random key instead of one in the code | A key for MMKV or SQLCipher |
| Start clean after the app is deleted and installed again on iOS | Reinstalls |
| Share a token with my other apps, a widget or an extension | Sharing between apps |
| Make an item follow the user to their other Apple devices | iCloud Keychain |
Tests
| I want to… | Guide |
|---|---|
| Run Jest without native code | Testing |
| Test a cancel, a lockout or changed biometrics in Jest | Testing |
| Test a phone without Face ID, or without a passcode | Testing |
| Test a migration from react-native-keychain or expo-secure-store | Testing |
| Pass Face ID or a fingerprint in Detox on a simulator or an emulator | Testing |
Coming from another library
Something not covered? The FAQ answers the common questions, and an issue is welcome.