mark
mark

Reputation: 77

Is AsyncStorage permanent?

I am storing my app's auth token in AsyncStorage. It appears that both on Android and iOS (less sure about this one), after long periods of inactivity (~2 weeks), users are logged out. I am sure that it doesn't have to do with the server.

Is AsyncStorage permanent?

EDIT: Well, that's embarrassing. The problem was on the server, and it wasn't AsyncStorage's fault.

Upvotes: 5

Views: 1508

Answers (1)

Coolness
Coolness

Reputation: 1992

From the RN docs https://facebook.github.io/react-native/docs/asyncstorage.html

On iOS, AsyncStorage is backed by native code that stores small values in a serialized dictionary and larger values in separate files. On Android, AsyncStorage will use either RocksDB or SQLite based on what is available.

Both the databases and the files sound permanent to me. Maybe your users are clearing your app's cache or local files somehow?

Upvotes: 5

Related Questions