Skip to content

docs: warn that the default AsyncStorage persistor is unencrypted - #1327

Open
sunitaprajapati89 wants to merge 3 commits into
masterfrom
Fix-default-persistor-writes
Open

sunitaprajapati89 wants to merge 3 commits into
masterfrom
Fix-default-persistor-writes

Conversation

@sunitaprajapati89

Copy link
Copy Markdown
Contributor

Summary

The default AsyncStorage persistor stores userId, identify
traits (email/name/etc.), and the full pending-event queue as cleartext
JSON, with no warning to integrators. This is an accepted tradeoff, not
a bug — the fix here is purely documentation.

Changes

  • packages/core/src/types.ts: JSDoc on storePersistor explaining the
    default is unencrypted and pointing to an encrypted alternative.
  • packages/sovran/src/persistor/async-storage-persistor.ts: doc
    comment on AsyncStoragePersistor spelling out the exposure (rooted/
    jailbroken devices, ADB backup, forensic extraction) and what's at risk.
  • README.md: new Data Storage & Security section with a runnable
    example of a storePersistor backed by react-native-encrypted-storage
    and the Persistor interface; linked from the install note and the
    storePersistor row in Client Options.

Testing

  • tsc --noEmit clean on packages/core and packages/sovran
  • Existing sovranStorage test suite passes unchanged
  • No runtime code paths touched — comments/docs only

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved

@didiergarcia didiergarcia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add a bit of error handling.

sunitaprajapati89 and others added 2 commits November 3, 2026 11:23
Add error handling to get/set, set storePersistorSaveDelay, fix Persistor
link anchors, and add a migration warning for existing apps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants