Describe your enhancement idea
After a successful login, Lockscreen resets authenticationAttempts to 0 through updateSettings. If that write fails (e.g. the keychain rejects setInternetCredentials), the unlock continues (since #4423 the error is logged), but the persisted counter keeps its value.
The next failed attempt counts up from that stale value (onAttemptLogIn reads the persisted count). Failed attempts from separate sessions therefore add up, and authenticationFailure() wipes the wallet after fewer than maxAuthenticationAttempts (5) failed attempts in one session.
This predates #4423: the reset used to be fire-and-forget, with the same outcome when the write failed.
A possible direction: retry the reset later, e.g. on the next start after a successful login.
Describe your enhancement idea
After a successful login,
LockscreenresetsauthenticationAttemptsto 0 throughupdateSettings. If that write fails (e.g. the keychain rejectssetInternetCredentials), the unlock continues (since #4423 the error is logged), but the persisted counter keeps its value.The next failed attempt counts up from that stale value (
onAttemptLogInreads the persisted count). Failed attempts from separate sessions therefore add up, andauthenticationFailure()wipes the wallet after fewer thanmaxAuthenticationAttempts(5) failed attempts in one session.This predates #4423: the reset used to be fire-and-forget, with the same outcome when the write failed.
A possible direction: retry the reset later, e.g. on the next start after a successful login.