Skip to main content

useSecureStorage

The useSecureStorage hook provides functions to interact with secure storage for sensitive data. You can use this for authentication tokens or any sensitive data that requires hardware-backed encryption.

Caution

You can only store one secret per Mini.

Note

Use useSecureStorage for sensitive data like auth tokens, API keys, or PII. It provides hardware-backed encryption on both iOS and Android, ensuring data is protected even if the device is compromised. The tradeoff is slower performance and a limit of one secret per Mini. Use useAsyncStorage for non-sensitive data like preferences or cached content. It supports multiple key-value pairs and is ~3x faster, but stores data in plaintext.

Anchor to useSecureStorage
useSecureStorage()


Was this page helpful?