Comments (7)
Has the plugin been initialized? I am guessing not since you respond natively to the notification...
from cordova-plugin-secure-storage.
Does the plugin even need any initialization on ios? The constructor doesn't seem to do much other than setting the service. And yes, the success callback is executed before the get call is done.
I initialize the storage plugins on device ready and start the bootstrapping once this setup is done.
I've also tested using keychain mode "Always", which worked and also "AfterFirstUnlockThisDeviceOnly", which did not work.
from cordova-plugin-secure-storage.
All cordova plugins need initialization for the bridge to work.
But since you do things natively, you might have more luck with accessing the keychain natively as well. For iOS we barely use https://github.com/soffes/SSKeychain to do so.
from cordova-plugin-secure-storage.
@Alex-Sessler wrote that he initializes the plugin after the onDeviceReady
event was fired, so Cordova did initialize the plugins. According to your securestorage.js
code, there is not further initialization necessary after calling the SecureStorage constructor as you immediately call the success function:
var SecureStorageiOS = function (success, error, service) {
this.service = service;
setTimeout(success, 0);
return this;
};
We don't try to do anything natively. The Objective-C code above is just to show you how the app is launched when a user clicks the notification.
As stated by @Alex-Sessler the issue is that if there is a notification present and the cordova app is in a terminated state, the app will be launched by clicking on the notification (native code from 1st post) but in this state, we can't access the KeyChain in our cordova app.
Launching the app by clicking on the icon or selecting the notification when the app is paused or running does not have this issue. We are trying to figure out if this is an issue with the Plugin, Cordova or the method how the app is launched by the native code.
from cordova-plugin-secure-storage.
I see. It wasn't clear to me that the onDeviceReady was fired.
I am not sure why this would happen. In our own product Crypho we do the same thing and can access the keychain just fine.
Would it be possible to create a simple test-case with pinned versions and see if it is reproducable?
from cordova-plugin-secure-storage.
The latest changes (moving the work to threads) fixed this issue for me.
from cordova-plugin-secure-storage.
awesome :)
from cordova-plugin-secure-storage.
Related Issues (20)
- Where can I inspect the saved passwords on my iOS device? HOT 4
- Exception on Android Pie HOT 7
- Where is sjcl_ss.js? HOT 4
- Dependency on SAMKeychain HOT 3
- uncaught exception error HOT 3
- Do not rely on internal Android API for screen unlock HOT 11
- Usage of OAEP HOT 1
- Link doesn't work in readme HOT 1
- Exception on Android Pie after adding back lock screen HOT 15
- Save value of ss.get() in a variable ? HOT 1
- Android Q API 28 ERROR: No Activity found to handle Intent { act=com.android.credentials.UNLOCK } HOT 32
- iOS User interaction is not allowed HOT 1
- Data is still accessible after loging out of icloud HOT 1
- icloud
- App using unlockCredentials crash on Android Q HOT 2
- Refactor actions in static class so it can be re-used by other plugins HOT 1
- How to check whether key exist or not HOT 1
- android.content.ActivityNotFoundException HOT 2
- Capacitor support HOT 1
- Still having a problem with this. Running emulator on 12.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-secure-storage.