Android 11 capacitor-secure-storage-plugin issue

We’re in the process of updating our Angular / Ionic 6 app so it can use Okta authentication and to do this we are using the ionic-appauth library. That library uses the capacitor-secure-storage-plugin to store it’s authentication token on the device.

We’ve come across a problem that only seems to occur on our Android 11 test devices - other versions of Android work as do all versions of iOS.

The problem occurs when the application is fully closed by the user i.e when they swipe-to-close it so it it not running in background.

On all devices apart from the Android 11 ones, the app opens up and the user is authenticated because their token is retrieved from storage. On the Android 11 device an error occurs (“Valid token could not be found”).

In other areas of the app we use the non-secure capacitor storage plugin and anything stored there is retrieved ok on startup of the app. So it looks like it’s simply an issue with Android 11 and the secure storage plugin.

Has anyone come across this or would have any idea if there is any solution - did Android 11 have specific storage settings that other versions do not have? (Android 12 works fine)