Skip to content

Commit b6666d2

Browse files
committed
feat : raise version of secure storage and added alert for migration failed
1 parent 0a952ab commit b6666d2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</js-module>
1616

1717
<dependency id="cordova-sqlcipher-adapter" url="https://github.com/OutSystems/cordova-sqlcipher-adapter.git" commit="0.1.7-OS5" />
18-
<dependency id="cordova-plugin-secure-storage" url="https://github.com/OutSystems/cordova-plugin-secure-storage.git" commit="fix/RMET-195/new-key-generator-and-migration" />
18+
<dependency id="cordova-plugin-secure-storage" url="https://github.com/OutSystems/cordova-plugin-secure-storage.git" commit="2.6.8-OS5" />
1919

2020
<dependency id="outsystems-plugin-disable-backup" url="https://github.com/OutSystems/outsystems-plugin-disable-backup.git" commit="1.0.0" />
2121
<dependency id="com.outsystems.plugins.logger" />

www/outsystems-secure-sqlite-init.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ function acquireLsk(successCallback, errorCallback) {
9191
} else {
9292
navigator.app.exitApp();
9393
}
94+
// When secure storage key migration fails
95+
} else if (error.message === "MIGRATION FAILED") {
96+
Logger.logError("Migration Failed.", "SecureSQLiteBundle");
97+
window.alert("Migration from old secure storage to a new one failed. Open again the app to retry the operation");
98+
navigator.app.exitApp();
99+
// Otherwise
94100
} else {
95101
errorCallback(error);
96102
}

0 commit comments

Comments
 (0)