Ionic-native: Secure storage plugin is no longer maintained and crashes on Android Q/10

Created on 4 Sep 2019  路  12Comments  路  Source: ionic-team/ionic-native

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/

Current behavior:

The plugin crashes on Android Q due to the usage of an internal Android api that has been deprecated or removed in Android 10. See https://github.com/Crypho/cordova-plugin-secure-storage/issues/169 for details.

Expected behavior:

The plugin should continue to work with Android 10, or it should be removed from ionic-native or users should at least get information when they visit the ionic native plugin catalogue.

Other information:

There is a fork that for now fixes the Android issues, but it doesn't seem to be plans to maintain it for iOS.

https://github.com/mibrito707/cordova-plugin-secure-storage

Most helpful comment

@l3ender Yes. To add:

First remove existing

cordova plugin remove cordova-plugin-secure-storage

Add the fork from mibrito707, 5.0.0 was latest release at this time

cordova plugin add [email protected]

The interface between the plugin and ionic-native hasn't changed.

All 12 comments

We face the same problem. First customers with Android Q/10 on Pixel devices cannot use our app anymore.

We face the same problem. First customers with Android Q/10 on Pixel devices cannot use our app anymore.

Take a look at the fork. It fixes the issue, but be aware of the new implementation details in the RSA-class, for instance it now adds a check that the key is kept in a secure environment. Could possibly give issues on older devices. Also there is an unmerged pull request to get the code to compile (https://github.com/mibrito707/cordova-plugin-secure-storage/pull/6)

@oddcb Thanks! Will try the fork.

Are people successfully using the @mibrito707 fork in Ionic apps?

If so, can you please share how your app references it? Does Ionic team need to add any work for type binding?

@l3ender Yes - we are using it productive as there was no other option. And it seems to work so far :-). Just reference the plugin in package.json ("cordova-plugin-secure-storage": "https://github.com/mibrito707/cordova-plugin-secure-storage.git").

@l3ender Yes. To add:

First remove existing

cordova plugin remove cordova-plugin-secure-storage

Add the fork from mibrito707, 5.0.0 was latest release at this time

cordova plugin add [email protected]

The interface between the plugin and ionic-native hasn't changed.

I will change the suggested plugin source inside the docs.

Please be caution while using that plugin (_cordova-plugin-secure-storage-echo_). For me it isn't working on some devices.. More info at this issue.

@eeschiavo Did you find a solution for this?

@eeschiavo Did you find a solution for this?

I ended up using this plugin which seems to work very well

I deleted this comment, it did not solve my problem. Now everybody have to reauthenticate after a couple of hours. Which means that the credential is not stored for a loong time.

@eeschiavo It did not work as expected. Now My credentials are stored correctly in secure storage, but after a couple of hours the stored credentials are gone. So it looks like it only stores for a couple of hours
:(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danbucholtz picture danbucholtz  路  3Comments

JaneDawson picture JaneDawson  路  4Comments

shaliko picture shaliko  路  3Comments

ajcrites picture ajcrites  路  3Comments

icchio picture icchio  路  3Comments