oblador / react-native-keychain

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

Understanding the key store access life cycle. #636

Open clauderobi opened 1 month ago

clauderobi commented 1 month ago

I am trying to diagnose an issue with my app in dealing with the key store. I will not go into the details because this is not the point of this Issues.

To understand what is happening I added console.log statements at critical steps, including when my module (the one, and only one importing react-native-keychain), is first loaded. That specific log is even before any import statement. To my surprise, the authentication prompt is given to the user even before my module is loaded. This raised a few questions

In all likelihood, it the react-native-keychain Java binding that is doing some magic. Without trying to speculate if it is true, is it fair to say that such magic, if indeed it is true, should be documented? And, it should also be parametrize with at least an on/off flag.

Or I have it all wrong......