question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setItem triggers Fingerprint on Android

See original GitHub issue

The following code (from the docs) triggers the fingerprint auth in Android while in iOs does not triggers (correctly) the Face ID.

Using v6 @next

I did expect a validation to retrieve the data, but not to store it for first time. Is it right? what is the expectation?

import SInfo from 'react-native-sensitive-info';

const savingFirstData = await SInfo.setItem('key1', 'value1', {
    sharedPreferencesName: 'mySharedPrefs',
    keychainService: 'myKeychain',
    touchID: true, //add this key
    showModal: true, //add this key
    kSecAccessControl: 'kSecAccessControlBiometryAny' // optional - Add support for FaceID
});

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
artolacommented, Feb 14, 2021

@mCodex This issue was reported before: https://github.com/mCodex/react-native-sensitive-info/issues/226

Nevertheless, while on iOs everything runs smooth, Android user experience is not that good (like require 2 times the fingerprint because of 1 get and a successive set). Playing with the options (adding them in get or set) produces very different effects depending in the platform. For example, iOs ignores the options (see example above) during the set, while Android honors them.

To be honest, due these limitations I am thinking about using other packages, 1 for encrypted storage (as using this one without options, valid too) plus 1 for biometric validation that also supports fallback to code and perform the 2 steps logic where required.

0reactions
fedeerbescommented, May 12, 2021

hi @mCodex and @artola do you have plans to work on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AlertDialog.Builder - Android Developers
Causes the current thread to wait until another thread invokes the notify() method or the notifyAll() ... Builder setItems (int itemsId, DialogInterface.
Read more >
Running and Testing Android Applications - SAP Help Portal
In Package Explorer, right-click the <project name> and select Run As > Android Application. Parent topic: Android Applications.
Read more >
Javascript – Persistent unique ID for Chrome tabs that lasts between ...
Tab.id; Tab.index; A 'fingerprint' of the document open in the tab ... setItem('sessionStorage', JSON.stringify(sessionStorage)); // the other tab should ...
Read more >
java - How to trigger KeygaurdManager to take fingerprint ...
As soon as I receive a push notification from my app I want to trigger the KeyguardManager to launch the fingerprint/pass code screen...
Read more >
[Solved]-Creating Libraries for iOS, Android and WP7 based on the ...
All of them support javascript applications, maybe you could port your app to javascript and HTML5. You would still have some specific code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found