Crypho / cordova-plugin-secure-storage

Secure storage plugin for Apache Cordova
MIT License
278 stars 269 forks source link

Cannot access SecureStorageObject in Ionic 5 if lock screen security disabled in Android #153

Closed jwburnside closed 6 years ago

jwburnside commented 6 years ago

I am injecting SecureStorage into my Ionic app constructor:

 constructor(
     private secureStorage: SecureStorage
  ) 

And then I attempt to create a namespace with lock screen disabled:

this.secureStorage.create(SecureStorageConstants.STORAGE_NAME)
      .then((storage: SecureStorageObject) => {
          storage.set(whatever)...
      }, err => {

      });
  }

Since the lock screen is disabled, the result is an error. I'd like to run secureDevice() in the error block, but I don't have access to the SecureStorageObject.

How do I handle the error in this case?

demetris-manikas commented 6 years ago

Hi. Sorry but this seems like a question for the ionic framework. Can't really help you with it. Closing for now.