android / android/security-samples
Not getting any callback while the IRIS scanner failed to authenticate a user.
- Dominant language
- Kotlin
- Stars
- 1k
- Forks
- 450
- PR merge metrics
- No merged PRs in 30d
Description
Not invoke any callback ( **onAuthenticationError** or **onAuthenticationFailed** ) while the IRIS scanner failed to authenticate a user.
Android Version: 10,
Samsung S9, One UI 2.1
`
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Executor executor = ContextCompat.getMainExecutor(this);
BiometricPrompt biometricPrompt = new BiometricPrompt(MainActivity.this,
executor, new BiometricPrompt.AuthenticationCallback() {
@Override
public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) {
super.onAuthenticationError(errorCode, errString);
Toast.makeText(getApplicationContext(),
"Authentication error: " + errString + errorCode, Toast.LENGTH_SHORT)
.show();
}
@Override
public void onAuthenticationSucceeded(
@NonNull BiometricPrompt.AuthenticationResult result) {
super.onAuthenticationSucceeded(result);
Toast.makeText(getApplicationContext(),
"Authentication succeeded!", Toast.LENGTH_SHORT).show();
}
@Override
public void onAuthenticationFailed() {
super.onAuthenticationFailed();
Toast.makeText(getApplicationContext(), "Authentication failed",
Toast.LENGTH_SHORT)
.show();
}
});
BiometricPrompt.PromptInfo promptInfo = new BiometricPrompt.PromptInfo.Builder()
.setTitle("Biometric login for my app")
.setSubtitle("Log in using your biometric credential")
.setNegativeButtonText("Use account password")
.setConfirmationRequired(true)
.setAllowedAuthenticators(BiometricManager.Authenticators.BIOMETRIC_STRONG)
.build();
BiometricManager biometricManager = BiometricManager.from(this);
}`
Contributor guide
Research direction
The issue names no repository file or test. Start by reproducing the BiometricPrompt setup shown on Android 10 with the Samsung S9 and IRIS authentication, then verify whether onAuthenticationError or onAuthenticationFailed is delivered when authentication fails; done when the missing callback behavior is reliably characterized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100