Retrieves the stored string value for the given storage key.
The unique storage identifier.
Stored string value, null if not found, or a Promise resolving to it.
OptionalremoveOptional cleanup handler to remove an entry from storage.
The unique storage identifier to delete.
Persists a key-value pair into storage.
The unique storage identifier.
The string payload to persist.
Interface for pluggable key-value persistence adapters used by UserTokenStore.
Remarks
Compatible with
AsyncStorage,expo-secure-store, MMKV,localStorage, or in-memory dictionaries.Storage security: The configured adapter persists the bearer identity token used to attribute all SDK actions (votes, comments, feedback, user attributes). Plaintext adapters like
AsyncStorageare suitable for local development or anonymous-only identifiers, but production applications—particularly those calling UserTokenStore.setToken with real user IDs—should configure an encrypted-at-rest adapter (such asexpo-secure-storein Expo orreact-native-keychain/ encrypted MMKV in bare React Native) to prevent token exposure via device backups or rooted device storage.Example
Plaintext adapter (development / anonymous-only):
Example
Encrypted adapter using
expo-secure-store(recommended for production & authenticated users):