Closed eric-boot closed 1 year ago
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 @martinkasa,
You made me check the whole flow again and I found the issue. Thanks for rubber ducking 😄
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