I'm submitting a ... (check one with "x")
[] bug report
[x ] feature request
Current behavior:
The current SecureStorage wrapper does not support secureDevice(successHandler,errorHandler) function which is present in the cordova plugin for android platform.
Also check this stackoverflow question
Expected behavior:
Should be able to do:
var ss = this.secureStorage.create('myStorage')
.then((storage: SecureStorageObject) => {
storage.set('var', 'toto')
.then(
() => ss.secureDevice(()=>{},()=>{}),
(e) => console.log('error');
);
}).catch((err) => {
console.error('The device is not secured');
})
Steps to reproduce:
Use the latest ionic blank app and try to access secureDevice function.
Apologies if I should have raised this with main ionic repo or at the cordova plugin repo. Please let me know.
@surajrao I added the missing function. Wait for the next release
thank you @danielsogl
Hi guys,
Unless I'm mistaken, this feature will not work. The promise that returns the SecureStorageObject (SecureStorage.create('secure_storage')) already fails with a Device is not secure error. Therefore, we never get the SecureStorageObject on which we can call the secureDevice method.
@surajrao How would this work? The ss variable is a Promise<void>. So there isn't a function called secureDevice on ss?
@irundaia Oh you are right.. https://github.com/Crypho/cordova-plugin-secure-storage/blob/master/www/securestorage.js#L266 The function does need SecureStorageObject which you will not have in catch.
Hey everybody,
Does this bug will be close ?
More over, it's seem that solution works : https://stackoverflow.com/questions/46520464/ionic-secure-storage-ask-the-user-to-set-a-lock-screen/46583135#46583135
Have a good day ;)
The solution implies that you鈥檇 have to patch the javascript code from ionic-native. To me, that does not sound like a solution but a hack.
Right, after doing some tests, it seems not work on iOS ...
I don't exactly how Ionic "wrapper" from Cordova works, somebody knows ?
Hey,
After some projects update to last version (in package.json), I've a new problem. Apple detection is weak. 95% of the time, app said that phone is unsecure. I do not have that bug on Android
Am I the only one ?
I will give more information if I success to debug iOS app from Linux (with Remote IOS Debug)
Have a good coding day
Most helpful comment
Hi guys,
Unless I'm mistaken, this feature will not work. The promise that returns the
SecureStorageObject(SecureStorage.create('secure_storage')) already fails with aDevice is not secureerror. Therefore, we never get theSecureStorageObjecton which we can call thesecureDevicemethod.