-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Android Fingerprint #195
Android Fingerprint #195
Conversation
hi! Thanks for the PR! For start, can you please rebase on master so there are no conflicts? Thanks. |
any updates on this? |
It seems as if there are now two open, but stalled, PRs for implementing Android Fingerprint support, this one and #148. I'm working on an application which is currently using a custom branch from the #148 PR. The feature seems to work reasonably well, and since we depend on this library I'd be willing to help out finalising implementation of this feature in the library. But before making yet another PR, I'd just like to check in with @vonovak @cladjules and @LinusU about the state of the development, and what functionality is still missing until the feature could be merged. Some open question I've seen in the discussion:
Would be good to have answers to these questions, or at least plans on how to solve them, before continuing work. All input is welcome. P.S. I chose this PR as the ground for discussion, as opposed to creating a separate issue for the feature, in order to not spread the discussion any further. I can move the discussion to a separate issue if someone feels like this is not the appropriate place for the discussion. |
Hi @aeirola sorry for being inactive for so long. Forcing all users to switch their own code base to use We cannot switch to
|
Hey @cladjules, thanks for the prompt reply. Sorry for misinterpreting the source of the biometric prompt fork. Thanks for correcting. Yeah, I do agree that forcing apps to use the Unfortunately I'm not familiar with the cryptosystems available in Android. Could look into them in detail if there is a chance that there would be some potentially undiscovered solutions available. |
Quickly browsed through Android keystore documentation, and seems like OAEP is referring to an alternative padding scheme for RSA, which is supported from Android 23+ (https://developer.android.com/training/articles/keystore#SupportedCiphers). Thus it could be used instead of the Android 23+ also includes support for elliptic curve keypair generators (https://developer.android.com/training/articles/keystore#SupportedKeyPairGenerators), so if there are some security concerns with RSA, it might be better to switch to it instead. |
I'm sorry, actually you're right, setting it as |
Any ETA on this functionality? |
I start thinking it's much easier to close PR and start a new one than rebase it... |
Hi everyone. I am now back from holidays. There are indeed still few crashes. Google has now officially released to androidx library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cladjules
If you can fix the conflicts and commit update, then I will be happy to update code by applying android "best practices" on it
android/build.gradle
Outdated
} | ||
|
||
dependencies { | ||
implementation 'com.facebook.react:react-native:+' | ||
implementation 'com.facebook.conceal:conceal:1.1.3@aar' | ||
implementation 'com.android.support:support-v4:27.0.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should align to version 28.0.0 - it guaranty that androidx with jetifier tool will be without any problems.
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.6.2 is the latest
EncryptionResult encrypt(@NonNull String service, @NonNull String username, @NonNull String password, SecurityLevel level) throws CryptoFailedException; | ||
|
||
DecryptionResult decrypt(@NonNull String service, @NonNull byte[] username, @NonNull byte[] password) throws CryptoFailedException; | ||
void decrypt(@NonNull DecryptionResultHandler decryptionResultHandler, @NonNull String service, @NonNull byte[] username, @NonNull byte[] password) throws CryptoFailedException, KeyPermanentlyInvalidatedException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a bad idea to change existing API. we should extend Public interface with new versions of API methods instead.
Correct approach:
- mark old api deprecated
- introduce new api with additional parameters/changes
- provide a migration code for users
- after 2-3 releases remove deprecated API methods
int getMinSupportedApiLevel(); | ||
|
||
void setCurrentActivity(Activity activity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeping a reference on activity is always not a very good idea. It can cause memory leak.
Sorry for stupid questions, but I have to ask to make it clear:
Does it mean that this PR will be a standalone branch in the future? or it was just a tricky way of applying the changes on code? Thanks for answers |
I suggest once we are happy with the state of the PR, we do a rebase? Thanks. |
I try to rebase it today... and it's somehow become a "falling snowball" that on each applied commit, produces so many changes that it becomes harder and harder to resolve the conflicts. |
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
} add this into |
Hi all, I didn't test it with an RN App as mine is not 0.60 yet. I will give it a go but I am not sure it will be a simple upgrade. |
I create alternative implementation, based on AndroidX biometric library - #260 used the same code architecture/design concept as in this PR |
Nice to see that @OleksandrKucherenko is also eager about biometric authentication for android in the library. Even though there is now a third PR about the same subject, I would suggest to finalize and merge this PR, and then continue the work Oleksandr has done in separate PRs. This includes some refactoring, Java unit tests etc. There still seems to be some steps left before this PR could be merged. The most immediate that come to mind are:
Is this something that you @cladjules would have time to finalize in the near future? |
Hi, @aeirola more than happy to do that. I am migrating to RN 0.6X soon, so happy to do some testing with either PR. Thanks. |
I was thinking that the #260 PR is quite large as it is, and would maybe be easier to progress by first introducing initial fingerprint functionality through this PR, and then separately bring in the additional changes by @OleksandrKucherenko in later PRs. This would make it easier and faster to review the changes. I would imagine all the changes to be released under the same version number though. |
@aeirola this PR contains files that belong to androidx biometric library. I recommend excluding them from PR and instead use reverse-jetified version of biometric AAR as project dependency. That will reduce the PR size greatly. |
Hi guys, I have done the changes on that lib and only uses AndroidX BiometricPrompt, seems to be working OK on both Android Pie and pre-Pie. I will look at merging the current master branch and resolve conflict. Would be good if you can review on your side. Thanks :) |
Superseded by #260 |
@cladjules Are there are pieces in this PR not currently present in master that you want in? |
@oblador Sorry, I haven't been very active those last few months. In my PR, I had done an implementation of Thanks :) |
Absolutely! |
Refactor Android Support Fingerprint to not use AndroidX.
Still need to refactor to not force FragmentActivity to be used.