Crypho / cordova-plugin-secure-storage

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

In some devices secure storage store key-value pair perfectly(Asus Zenfon max ). But in some devices like htc secure storage doesn't clear the key value pair after calling this.secureStorage.remove('key') #90

Closed neelancherivishnu closed 7 years ago

neelancherivishnu commented 7 years ago

This is my code: ` this.platfrm.ready().then(() => { this.secureStorage= new SecureStorage(); this.secureStorage.create('storeroom') .then( () => console.log('Storage is ready!'), error =>console.log(error) ); this.secureStorage.remove('refcode') .then( data=>console.log('removed'), error=>console.log(error) ); this.secureStorage.remove('userId') .then( data => {console.log(data); // this.secureStorage.remove('status') .then( ()=>{console.log('success stat'); this.navCtlr.push(StarterPage); }, error=>{console.log(error)} ); //

  },
  error => console.log(error)
);`
ggozad commented 7 years ago

Could you please run the tests and let us know what fails? Also what is the error you get?

demetris-manikas commented 7 years ago

Hi. I believe the error that remove is called outside of the success function of create. One can safely use the storage only when the success of create has been called.

ggozad commented 7 years ago

@demetris-manikas indeed, closing this unless more info is provided.