Crypho/cordova-plugin-secure-storage

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

Closed this issue · 1 comments

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?

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