oblador / react-native-keychain

:key: Keychain Access for React Native
MIT License
3.12k stars 515 forks source link

How to store my password keychain in Android keystore using react-native-keychain #616

Open dimitarsabev00 opened 8 months ago

dimitarsabev00 commented 8 months ago

My code : `if (Platform.OS === 'ios') { // On iCloud KeyChain,

          await Keychain.setSharedWebCredentials('fightscout', email, password)
        } else {
          // On Android Keystore,
          // first variant
          await Keychain.setGenericPassword(email, password, {
            service: 'fightscout',
            securityLevel: Keychain.SECURITY_LEVEL.SECURE_SOFTWARE,
             storage: Keychain.STORAGE_TYPE.AES
           })
          // second variant
          await Keychain.setInternetCredentials('fightscout', email, password, {
            service: 'fightscout',
            securityLevel: Keychain.SECURITY_LEVEL.SECURE_SOFTWARE,
            storage: Keychain.STORAGE_TYPE.AES
          })
        }`

What should i write for Android Keystore?

For iCloud Keychain it works perfectly, but I want it to work for Android Keystore as well