Skip to content
Docs
Changelog

Encrypted offline snapshots in the native app, as an option

EXPO_PUBLIC_ENCRYPT_SNAPSHOTS=1 seals the app's private snapshots with AES-256-GCM under a key that never leaves the device. Sign-out destroys the key first. Off by default until checked on a device.

Markdown

  • New option: EXPO_PUBLIC_ENCRYPT_SNAPSHOTS=1. The native app's private snapshots (today the todo list) are stored as AES-256-GCM ciphertext instead of plain JSON. The key is 256 random bits per installation in expo-secure-store, for this device only and readable only while it is unlocked. Every file is bound to its namespace, account and Organization, so a file copied into another place does not open. No new native module: expo-crypto and expo-secure-store are already in the development client. See Mobile. (1112db0)
  • Sign-out destroys the key first. clearPrivateCaches() blanks the key, then deletes the folder; a file the deletion misses cannot be read again. An Organization switch still deletes nothing: each Organization keeps its own file for 24 hours. (1112db0)
  • For a feature that keeps a snapshot. A sealed snapshot opens one step after the first render. Read it with snapshot.restore(scope) next to initialData, as todo.list.hooks.ts does. With the option off nothing changes.
  • Off by default. The format, the key and the store are tested with WebCrypto standing in for the cipher; the native adapters have not run on a device yet (issue #243). ADR-0022 records the design and what a device-first product with offline writes would still need. (bf4e86d)
Edit on GitHubDocumentation is in English.
Cookie settings
We use essential cookies to make our app work. With your consent, we also use optional cookies to improve your experience.

Read our Cookie Policy and Privacy Policy.