React-native-keychain: Touch ID prompt not showing when using accessControl on emulator

Created on 2 Mar 2018  路  3Comments  路  Source: oblador/react-native-keychain

async componentDidMount() {

    await Keychain.resetGenericPassword();


      await Keychain.setGenericPassword('username', 'secret', {
        accessControl: Keychain.ACCESS_CONTROL.BIOMETRY_ANY_OR_DEVICE_PASSCODE
      });

    var privateKey = await Keychain.getGenericPassword();

    console.log(privateKey)


  }

The app is able to set and grab a set of credentials without any biometric or passcode authentication. What am I doing wrong here?

All 3 comments

This is a limitation of the simulator, try it on a real device instead :-)

Hmm, unfortunate. Closing.

You can also make sure on your simulator that you are Enrolled for Touch ID so it prompts you for fingerprint - worked for me.

capture d ecran 2018-04-10 a 14 50 24

Was this page helpful?
0 / 5 - 0 ratings