-
-
Notifications
You must be signed in to change notification settings - Fork 45
Added analytics event for PersonalID account lockout (on Backup Code … #3371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughA single analytics event reporting call is added to the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes This change involves a single, straightforward addition of one analytics reporting call to an existing method with no modifications to control flow, business logic, or public interfaces. The addition is localized, low-risk, and requires minimal verification beyond confirming the correct analytics event and parameter are being used. Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)app/src/org/commcare/fragments/personalId/PersonalIdBackupCodeFragment.java (2)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
shubham1g5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking on my review given we might need to get this in the release quite soon.
|
|
||
| private void handleAccountLockout() { | ||
| logRecoveryResult(false); | ||
| FirebaseAnalyticsUtil.reportPersonalIdConfigurationFailure(AnalyticsParamValue.START_CONFIGURATION_LOCKED_ACCOUNT_FAILURE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OrangeAndGreen I see this is also being logged by handleCommonSignupFailures ? and I am confused what path is the right one that gets triggered on locked account ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we still have plans to clean this up but in the meantime it gets caught in two ways. One is the case in this fragment where the API call to verify backup code succeeds whether correct/incorrect/locked, but the session is updated to indicate which is the case (via dbKey, sessionFailureCode, and attemptsLeft).
In any other API call the server can also fail and return a code indicating that the account is locked, which we handle with a common error handler. In practice I think that failure only ever happens on the confirm_otp call, although it could be on other calls later in the workflow as well.
Added an analytics event when the user is informed that their PersonalID account has been locked on the Backup Code page.