Skip to main content
Since version 1.0.4 and onwards, our SDK is securely storing the session key on the device’s local storage. Previously, that was done directly in the webview’s localStorage, which isn’t very secure. On iOS devices, the session is securely stored inside the Keychain and retrieved only when necessary. On all other devices, the session is stored inside AES-encrypted PlayerPrefs, so it’s still secure. However, if you want to maximize the security of your users’ session keys in the actual Android Keystore, you would need to do the following: Since our implementation of Android Secure Storage depends on the AndroidX Data Store and Android Tink, we need to manually add it to the Unity project. To do so: Go to Player Settings -> Other Settings: Set Custom Main Gradle Template checkbox to true if they’re not already set. Inside the mainTemplate.gradle, add the following inside the dependencies block: implementation 'androidx.datastore:datastore-preferences:1.1.1' implementation 'com.google.crypto.tink:tink-android:1.11.0' If you don’t have any other custom library of your own, it should look like this
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.datastore:datastore-preferences:1.1.1'
    implementation 'com.google.crypto.tink:tink-android:1.11.0'
**DEPS**}
And that’s it! If you didn’t successfully installed the AndroidX Crypto library you will see the following error in the Android Logcat
User does not have the androidX crypto library
Followed by the stacktrace and a message that the class hasn’t been found.