Skip to content

Commit

Permalink
[local-authentication] add iris authentication type for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed May 22, 2020
1 parent d4abd9a commit 4b3fb6b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/expo-local-authentication/CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
### 🎉 New features

- Added support for `promptMessage`, `cancelLabel` and `disableDeviceFallback` on Android. ([#8219](https://github.com/expo/expo/pull/8219) by [@diegolmello](https://github.com/diegolmello))
- Added iris local authentication type for Android. ([#8431](https://github.com/expo/expo/pull/8364) by [@bycedric](https://github.com/bycedric))

### 🐛 Bug fixes

Expand Down
Expand Up @@ -38,6 +38,7 @@ public class LocalAuthenticationModule extends ExportedModule {

private static final int AUTHENTICATION_TYPE_FINGERPRINT = 1;
private static final int AUTHENTICATION_TYPE_FACIAL_RECOGNITION = 2;
private static final int AUTHENTICATION_TYPE_IRIS = 3;

private final BiometricPrompt.AuthenticationCallback mAuthenticationCallback =
new BiometricPrompt.AuthenticationCallback () {
Expand Down Expand Up @@ -92,6 +93,9 @@ public void supportedAuthenticationTypesAsync(final Promise promise) {
if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)) {
results.add(AUTHENTICATION_TYPE_FACIAL_RECOGNITION);
}
if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_IRIS)) {
results.add(AUTHENTICATION_TYPE_IRIS);
}
promise.resolve(results);
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -3,6 +3,8 @@ export type LocalAuthenticationResult = { success: true } | { success: false; er
export enum AuthenticationType {
FINGERPRINT = 1,
FACIAL_RECOGNITION = 2,
// Android only
IRIS = 3,
}

export type LocalAuthenticationOptions = {
Expand Down

0 comments on commit 4b3fb6b

Please sign in to comment.