Questions tagged [react-native-keychain]
33 questions
7
votes
2 answers
How to save Multiple Key Values using react-native-keychain?
I have multiple key, value and I dont know how can I store multiple key, value in different places.
Is there an alternative way for the following code using react-native-keychain package ??
await AsyncStorage.setItem('pincode', '12345');
await…

Muhammad
- 2,572
- 4
- 24
- 46
5
votes
0 answers
Mocking react-native-keychain, undefined is not a function
I'm trying to write a test for my helper functions, which uses the react-native-keychain Library.
I accordingly to the documentation mocked the library.
I added a directory react-native-keychain to the __mocks__ directory and added the following…

Florian Weber
- 51
- 3
4
votes
1 answer
react-native-keychain: AES storage throwing "could not encrypt data with alias: "
I recently change the keychain storage to AES and now some users are experiencing the error could not encrypt data with alias: after Keychain.setGenericPassword(username, password) is run.
I couldn't find from the documentation why I'd get such an…

F Pavanela
- 91
- 3
3
votes
0 answers
Face authentication using React native keychain in Android
I'm trying to set and get data using react native keychain library with below options:
accessControl: ACCESS_CONTROL.BIOMETRY_ANY,
accessible: ACCESSIBLE.WHEN_UNLOCKED
I was successfully set the data. When I'm trying to retrieve data using…

Milan savani
- 31
- 2
3
votes
2 answers
TypeError: null is not an object (evaluating 'RNKeychainManager.SECURITY_LEVEL_ANY')
I am going to use the react-native-keychain lib in my RN project but seems to be not working on my local.
RN: 0.61.5
react-native-keychain: "6.1.1",
I tried to like this.
.......
const MEMORY_KEY_PREFIX = '@MyStorage:'
let dataMemory = {}
class…

goldvenus
- 898
- 1
- 10
- 21
2
votes
1 answer
problem using getAllGenericPasswordServices in react-native-keychain
I'm trying to use react-native-keychain api and having some problems with getAllGenericPasswordServices()
I want to retrieve all the names of the passwords that I stored in the keychain in typeof array so I could show the client a list of all of his…

Sahar Toledano
- 41
- 4
2
votes
0 answers
React Native Keychain - Cannot read property 'getSupportedBiometryType' of null
I have followed the installation steps, but when I start the application on android I get an error saying: "Cannot read property 'getSupportedBiometryType' of null, please check the last image.
Run yarn add react-native-keychain - Only for React…

Branislav Brnjos
- 21
- 1
1
vote
0 answers
Difference between username/password in react-native-keychain?
I'm integrating with react-native-keychain and I'm somewhat confused about the setGenericPassword and getGenericPassword methods. What exactly is the difference between username and password for the setGenericPassword(username, password, ...) method…

Curious
- 23
- 4
1
vote
1 answer
How to return Sensitive Info Keychain value in React Native?
I have a token I stored using the sensitive info keychain but when I try to get the token I keep getting either undefined or {"_U": 0, "_V": 0, "_W": null, "_X": null}
My code:
// Get Token from storage
const getToken = async () => await…

jdez
- 189
- 1
- 10
1
vote
1 answer
React Native, React Native Keychain. Questions
I have some questions regarding react native and react native keychain.
I'm new to react native and trying to build a mobile application.
How can I store cookies in react native and if it's possible how can I send it to backend just like in web…

FatFatty
- 76
- 1
- 13
1
vote
1 answer
React native keychain error when using setGenericPassword function
I am using keychain package to store credentials. After I build the app this package doesn't work but throws an error.
This is the error:
Attempt to invoke virtual method 'void…

FaFa
- 358
- 2
- 16
1
vote
0 answers
How to add JWT auth and RSA private or public key in react native keychain?
I am trying to create one login/signup page which is storing the value in keychain and I am trying to store the JWT token while login on device and public key get store on server side the private key store in client side will ask for biometric and…

Kumar Shivam
- 137
- 1
- 9
1
vote
1 answer
Execution failed for task ':react-native-keychain:compileReleaseJavaWithJavac'. when trying to ./gradlew bundleRelease
I am trying to get the .aab and the .apk files to publish the android side of a react-native app to the Google Play Store.
After about 2 minutes of working Task :react-native-keychain:compileReleaseJavaWithJavac FAILED is printed.
It gives a…

Thomas S.
- 85
- 10
1
vote
1 answer
How to optimize react-native-keychain performance?
I am building a react-native application that uses react-native-keychain to securely save the user's tokens. I know that keychain is for saving username/password combination but i thought it would do no harm to save my tokens instead. I'm currently…

ApoGrs
- 13
- 3
0
votes
0 answers
react-native-keychain does not persist data on android
I am using react-native-keychain for storing data.
In ios it is working fine even you uninstall and re-install the app.
But on android it is returning false
export const setCredentials = async ({
username,
password,
}: {
username: string;
…

Riku
- 652
- 1
- 9
- 24