EddyVerbruggen / nativescript-secure-storage

:closed_lock_with_key: NativeScript plugin for secure local storage of fi. passwords
MIT License
111 stars 26 forks source link

Data stored with nativescript-secure-storage are not persistent #12

Closed alexmeia closed 6 years ago

alexmeia commented 6 years ago

I am testing the plugin to store access token and refresh token in a OpenID Connect Authorization Code Flow. I expected the the data stored were persistent and could be retrieved after the application is closed. The actual behaviour seems to be that data are persisted for a limited time (so, there is no real persistence). In particular, if I close and reopen the application at interval of some hours the stored data are retrieved correctly. If I open the app after one or two days nothing is found.

I am not sure if this is the expected behaviour or is an issue. Moreover, the case is not easy to test. I opened the issue to get some informations and better understand the purpose of the plugin.

EddyVerbruggen commented 6 years ago

It's supposed to persist until you remove the app.

Android or IOS?

alexmeia commented 6 years ago

Android. I am waiting for feedback from iOS users. Thanks for the fast answer. I don't exclude that the problem can be in my refresh token management and not in your plugin. I will do some debugging.

alexmeia commented 6 years ago

@EddyVerbruggen after some days of testing I can confirm that your Secure Storage Plugin works perfectly. The problem was in the way I managed the OIDC Code Flow. I close the issue, that has never been a real issue. Thanks again.