Reputation: 387
Am developing React native expo bare flow app, Actually am using expo secure store to store the user Auth Token for checking login status, and while Logout I just cleared expo secure store. But if the user uninstalled the app without logout and reinstalling the App then the app is redirected to the main screen Because the expo secure store still maintains the Auth token. How to clear expo secure store data while uninstalling.
Am facing this Issue with IOS, Please give any suggestions to fix this.
Upvotes: 6
Views: 4396
Reputation: 4054
An alternative solution is to store your secrets under a random key that is stored in non-secure storage (which is wiped at uninstall). It will still be there after reinstallation, but it can't be accessed.
Someone else's idea: https://developer.apple.com/forums/thread/36442?answerId=112814022#112814022
Upvotes: -1
Reputation: 376
I had this issue in the native iOS world. Keychain (secure store) holds references to previous install of an app.
For me solution was to have a flag in UserDefaults (that is cleared between uninstalls) that indicated some data - i.e. first launch date. If the flag was empty, we knew that app was freshly launched and I should clean the shared keychain before running the app for the first time.
Upvotes: 4