Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this library's resetGenericPassword method is not working #590

Open
ceyanesb opened this issue Feb 24, 2023 · 9 comments
Open

this library's resetGenericPassword method is not working #590

ceyanesb opened this issue Feb 24, 2023 · 9 comments
Assignees

Comments

@ceyanesb
Copy link

I am developing an app and I want to clean my credentials when the app is installed for and opened for the first time or when the user logs out.

Every time I login, then uninstall and then install the app again i get the credentials which I shouldn't get.

@BraveEvidence
Copy link

@raza-jamil-reckon
Copy link

Seeing the same thing, our logout stopped working all of a sudden and I've tracked it back to resetGenericPassword not doing anything. It returns a true value, which means it thinks it's succeeded but it doesn't actually reset the keychain.

@senghuot-lay
Copy link

For some reason, when I added readKeychain before resetting it works. Maybe someone here could explain to me why?

export async function resetKeychain() {
  await readKeychain();
  await resetGenericPassword();
}

@jon-eubank
Copy link

jon-eubank commented Sep 22, 2023

In my app (RN 0.71.12) when using react-native-keychain v8.1.1, if I call the resetGenericPassword() method after having saved my username and password previously, and then call getGenericPassword() afterwards it will return false. However if I then close the app, reopen it, and call getGenericPassword() then it will return garbage credentials, where the username is set to null and the password is some random string of letters, numbers, and dashes.

@JuozasIzi1
Copy link

@DorianMazur this is behaviour also happens for me also is this planned to look into? this really bad bug, that could leak users data to another and have GDPR issues.

@DorianMazur
Copy link
Collaborator

DorianMazur commented Aug 7, 2024

Hey @JuozasIzi1 Yes, I will be working on it. I'm currently working on two PRs: one adds end-to-end tests, which should help cover important scenarios like this :) . I'll try to recreate and fix this bug.

@ezescigo
Copy link

Same happening to me on RN v0.71.14 and react-native-Keychain v9.0.0.

@DorianMazur
Copy link
Collaborator

I don't think this is happening in 9.0.0 or 9.1.0. Can you provide example repository or reproduction steps?

@DorianMazur DorianMazur self-assigned this Oct 24, 2024
@ezescigo
Copy link

unfortunately I can't, it's a private repository. But I'm not able to delete the saved credentials, so yeah, there's an issue with it at least on my case. Sadly I will need to use other library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants