android / android/security-samples
Not getting any callback while the IRIS scanner failed to authenticate a user.
- Vorherrschende Sprache
- Kotlin
- Sterne
- 1k
- Forks
- 450
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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);
}`
Beitragsleitfaden
Rechercherichtung
Das Issue nennt keine Repository-Datei und keinen Test. Beginne damit, das auf Android 10 mit dem Samsung S9 und IRIS-Authentifizierung gezeigte BiometricPrompt-Setup zu reproduzieren, und überprüfe anschließend, ob bei einem Fehlschlagen der Authentifizierung onAuthenticationError oder onAuthenticationFailed ausgeliefert wird; abgeschlossen ist die Untersuchung, wenn das Verhalten des fehlenden Callbacks zuverlässig charakterisiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, java
- Bereich
- authentication, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100