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

Add hasInternetCredentials #150

Merged

Conversation

Jyrno42
Copy link
Contributor

@Jyrno42 Jyrno42 commented Sep 13, 2018

This checks if the username/password combination for server is available in the secure storage.
Resolves to true if an entry exists or false if it doesn't.

This checks if the username/password combination for server is available in the secure storage.
Resolves to `true` if an entry exists or `false` if it doesn't.
@vonovak
Copy link
Collaborator

vonovak commented Sep 13, 2018

hi @Jyrno42 and thanks for the PR. Can you explain the motivation for this? Specifically, how is this different from checking the result of getInternetCredentials? Thanks.

@Jyrno42
Copy link
Contributor Author

Jyrno42 commented Sep 13, 2018

The difference between this and getInternetCredentials is that it does not require biometric [1] unlocking to check if the credentials exist or not. With this I can for example dynamically show/hide Login with Fingerprint/TouchID/FaceID button based on the existance of the credentials.

On android theres no use for this until #148 is merged.

[1] On IOS below 9 it will still ask for credentials since kSecUseAuthenticationUIFail was added in 9.

@vonovak
Copy link
Collaborator

vonovak commented Sep 19, 2018

Okay, that sounds reasonable! The ios 9 note should be added to the docs as well I think..?

@oblador oblador merged commit b2c07b9 into oblador:master Sep 30, 2018
@oblador
Copy link
Owner

oblador commented Sep 30, 2018

Thanks @Jyrno42!
@vonovak Think maybe it's time to bump min supported version to iOS 9? This the new min in React Native as of 0.56.

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

Successfully merging this pull request may close these issues.

3 participants