Skip to content

fix(ui): Login attempts not reset after successful biometrics login#1577

Open
Sotatek-DukeVu wants to merge 1 commit intodevelopfrom
VT20-2532-login-attempts-not-reset-after-successful-biometrics-login
Open

fix(ui): Login attempts not reset after successful biometrics login#1577
Sotatek-DukeVu wants to merge 1 commit intodevelopfrom
VT20-2532-login-attempts-not-reset-after-successful-biometrics-login

Conversation

@Sotatek-DukeVu
Copy link
Collaborator

Description

Please include a summary of the changes and a brief description about this PR.

Checklist before requesting a review

Issue ticket number and link

  • This PR has a valid ticket number or issue: VT20-2532

Testing & Validation

  • This PR has been tested/validated in iOS, Android and browser.
  • Added new unit tests, if relevant.

Design Review

  • In case this PR contains changes to the UI, add some screenshots and/or videos to show the changes on relevant devices.
Screen.Recording.2026-02-05.at.15.49.10.mov

@Sotatek-DukeVu Sotatek-DukeVu changed the base branch from main to develop February 5, 2026 09:14
@Sotatek-DukeVu Sotatek-DukeVu self-assigned this Feb 5, 2026
@Sotatek-DukeVu Sotatek-DukeVu changed the title Vt20 2532 login attempts not reset after successful biometrics login fix(ui): Login attempts not reset after successful biometrics login Feb 5, 2026
try {
await disablePrivacy();
authenResult = await handleBiometricAuth();
await resetLoginAttempt();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resetLoginAttempt() call is placed immediately after handleBiometricAuth() without checking the result.
If handleBiometricAuth() returns FAILURE, USER_CANCELLED, or NOT_AVAILABLE, the passcode attempt counter will still be reset. This could potentially allow an attacker to bypass the "max attempts" lockout for passcode guessing by simply toggling the biometric prompt (starting and cancelling it) to reset their counter

});
});

test("Reset login attempt after login by biometric auth", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually uses passcodeFiller to log in, not biometrics. It mocks verifySecretMock (passcode check) to true. This tests that passcode login resets attempts (which is expected but irrelevant to the PR).

This test should likely use handleBiometricAuthMock resolving to SUCCESS to actually test the biometric flow, similar to the updated Login using biometrics test.

Also, there is no test verifying that resetLoginAttemptsMock is NOT called when biometric auth fails or is cancelled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants