react-native-keychain
react-native-keychain copied to clipboard
iOS 14.4 getGenericPassword returns a string when there is no password in keychain
For some reason, getGenericPassword in iOS 14.4 is returning a big string when the user has no password in the keychain.
const { password } = await Keychain.getGenericPassword();
console.log(`PIN is ${password}`)
I don't know if it is related but the full process to reproduce it for us was to
- reset the password:
Keychain.resetGenericPassword()
- reload the app
- call
Keychain.getGenericPassword()
I believe I can push a reproduction repository if you need to.
It's possible that another library also store stuff in the keychain that you are getting. Try specifying a service
instead.
What @oblador said.