Repository navigation
Conversation
…ack when a wrong fingerprint/pin is entered
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
pmathew92
marked this pull request as ready for review
October 19, 2026 15:38
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
SecureCredentialsManagerwithLocalAuthenticationOptionscould deliver two results for a singlegetCredentials()/getApiCredentials()call when the user presented an unrecognized biometric and then authenticated successfully (for example via the device credential fallback).LocalAuthenticationManager.onAuthenticationFailed()calledresultCallback.onFailure(BIOMETRICS_INVALID_USER).BiometricPromptinvokesonAuthenticationFailed()when a biometric is read but not recognized; it is not a terminal event, and the prompt stays open. The terminal result always arrives later viaonAuthenticationSucceeded()oronAuthenticationError().Impact before this change:
onFailure(BIOMETRICS_INVALID_USER)while the prompt was still open, thenonSuccessafter the user authenticated. Callers that settle on the first result (e.g. react-native-auth0) showed a failure and dropped the success, while the biometric session was still started.awaitCredentials/awaitApiCredentials): the continuation was resumed twice, throwingIllegalStateException: Already resumed.runCatchingOnExecutorconverted that into anUNKNOWN_ERRORfailure, which attempted a third resume and threw again from the executor thread.References
Testing
New unit tests in
LocalAuthenticationManagerTest:onSuccess(true).ERROR_LOCKOUTdelivers onlyBIOMETRIC_ERROR_LOCKOUT.New coroutine tests in
SecureCredentialsManagerTest, using a realLocalAuthenticationManager(spy with onlyauthenticate()stubbed) so the actualonAuthenticationFailed()path is exercised:awaitCredentials()returns credentials when an unrecognized biometric is followed by success.awaitCredentials()throws onlyBIOMETRIC_ERROR_LOCKOUTwhen an unrecognized biometric is followed by lockout.awaitApiCredentials()returns API credentials when an unrecognized biometric is followed by success.With the old
onFailurecall restored, all six new tests fail, and the three coroutine tests fail withIllegalStateException: Already resumed. With the fix,LocalAuthenticationManagerTest(40) andSecureCredentialsManagerTest(135) pass.This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language or why not
Checklist
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors