function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sbanu 9.3 Prod Sayeedasbanu 9.3 Prod Sayeeda 

how to store smart store data after app logout

We have a complex app that uses smartstore to cache large amounts of data. The problem we're facing is that we've seen users getting logged out intermittently . but it's frustrating to see thousands (and potentially millions) of records being wiped off because the user was logged out forcibly.
 
Hope this helps. I really do hope that there's a plan to persist the SmartStore data beyond a current user session.

Please help me need to know how to store the smart store data to JSON file before logout/Oauth expires.
bob_buzzardbob_buzzard
You won't be able to access the smartstore once a user session expires as that is the whole security model. Otherwise one user could logout, another could login and be given access to the first users records in the smartstore.

You'll need to manage the export and storage yourself if you want to do this - Cordova provides the File plugin that will allow you to read and write the to filesystem, but you'll lose any semblance of securing the data to a specific user unless you handle that yourself.