cordova-plugin-secure-storage-echo icon indicating copy to clipboard operation
cordova-plugin-secure-storage-echo copied to clipboard

iOS: secure storage is persistent after reinstall

Open EenPOOL opened this issue 4 years ago • 4 comments

Hi,

Is it an expected feature that the secure storage is persistent even after removing the app from the device? It only happens on iOS, on Android it looks like the storage is removed togheter with the app?

Is it possible to remove the secure storage togheter with the app from the device? Or any other workaround?

Thanks in advance!

EenPOOL avatar Nov 16 '20 15:11 EenPOOL

Same here. Any news on this?

AE1NS avatar Dec 03 '20 12:12 AE1NS

https://stackoverflow.com/questions/42431562/ios-10-3-beta-3-doesnt-persist-data-of-keychainitem#answer-43150729 "Since iOS 10.3 beta 6, the keychain is persisted." So iOS handles it that way and its not a bug of this plugin.

AE1NS avatar Jan 12 '21 12:01 AE1NS

Any further updates on this?

gpsimmo avatar Feb 11 '21 17:02 gpsimmo

What update do you expect if its apples mechanism like this right now? Our 'solution' is to check if the non secure storage is empty and then we clear the secure storage afterwards. This works in our case, because we are filling the storage at the first app start. Something like:

if (!await Storage.get('IsInitalized')) {
    // first start => reset iOS secure storage, because it was not resetted on uninstall
    await SecureStorage.clear();
    await Storage.set('IsInitalized', true);
}

Its maybe not the best solution but its working for us.

AE1NS avatar Feb 12 '21 14:02 AE1NS