You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we use this plugin so that app user can log in via a digit code. This digit code is set up by the app user during the onboarding in our app.
We have migrated from Capacitor 2 to Capacitor 4 which made us update the version we use of this plugin. When we were running on Capacitor 2 we used version 0.4.0 of this package and after updating to Capacitor 4 we use the most recent (0.8.0) version.
After that version bump all of our app user (iOS & Android, except Web) suddenly lost there digit code which needed them to onboard again.
Investigation showed us that te problem disappeared when we downgraden the version from 0.8.0 to 0.4.0: the digit code was present again! Especially, the problem is caused in the changes made between 0.5.1 and 0.6.0 (see diff)
Reproduction steps:
Run an app with at least the following dependencies
await SecureStoragePlugin.set({ key: 'digitCode', value: '1234' });
SecureStoragePlugin.get({ key: 'digitCode' })
.then(console.log) // '1234'
.catch(console.error) // not called
Upgrade capacitor-secure-storage-plugin to 0.6.0
Executing the getter results in no value
SecureStoragePlugin.get({ key: 'digitCode' })
.then(console.log) // not called
.catch(console.error) // results in 'Item with given key does not exist'
Expected behaviour
Step 4 must result in logging the digit code which was set before updating to version 0.6.0
The text was updated successfully, but these errors were encountered:
eric-boot
changed the title
Storage is empty after updating from 0.5.1 to 0.6.0
Storage is 'empty' after updating from 0.5.1 to 0.6.0
Oct 12, 2022
Hi @eric-boot, version 0.5.1 is compatible with Capacitor v2. Up to 0.7.1 it is compatible with Capacitor v3 and more recent version are for Capacitor v4. I can see that you tried to use version 0.5.1 of the plugin with Capacitor v4. Honestly I did not try how it behaves, but since it is not compatible with each other, (now I am just guessing) probably your digitCode was stored in web localstorage, not encrypted properly and then by upgrading the plugin to the version compatible with Capacitor v4, it tries to read it from native secure storage, but it is not there.
Try to check localstorage of webview, or call getPlatform() method to be sure if native implementation is used, or just unsecure web fallback.
Hi!
Currently we use this plugin so that app user can log in via a digit code. This digit code is set up by the app user during the onboarding in our app.
We have migrated from Capacitor 2 to Capacitor 4 which made us update the version we use of this plugin. When we were running on Capacitor 2 we used version 0.4.0 of this package and after updating to Capacitor 4 we use the most recent (0.8.0) version.
After that version bump all of our app user (iOS & Android, except Web) suddenly lost there digit code which needed them to onboard again.
Investigation showed us that te problem disappeared when we downgraden the version from 0.8.0 to 0.4.0: the digit code was present again! Especially, the problem is caused in the changes made between 0.5.1 and 0.6.0 (see diff)
Reproduction steps:
Expected behaviour
Step 4 must result in logging the digit code which was set before updating to version 0.6.0
The text was updated successfully, but these errors were encountered: