LG-12365 Log rate limit status on verify-by-mail enter-code controller#10324
Merged
LG-12365 Log rate limit status on verify-by-mail enter-code controller#10324
Conversation
We have serveral rate limits that are enforced when the user visits the verify-by-mail code entry screen: 1. _OTP Rate-Limit_: This limit applies to OTP entries. After the user has entered too many OTPs this is enforced and the user is redirected to an error screen. 2. _Letter request limit_: This limit applies to letter requests. After the user has requested too many letters or if the users profile is too old the user no longer sees the option to request a new letter. The enter code screen enforced these limits but did not add any indicator to the logs that it was doing so. This commit adds properties to the analytics event for each of these cases so we can monitor how the app is behaving. [skip changelog]
theabrad
approved these changes
Mar 27, 2024
jmax-gsa
reviewed
Mar 27, 2024
| analytics.idv_verify_by_mail_enter_code_visited( | ||
| source: if @user_did_not_receive_letter then 'gpo_reminder_email' end, | ||
| otp_rate_limited: rate_limiter.limited?, | ||
| user_can_request_another_letter: @can_request_another_letter, |
Contributor
There was a problem hiding this comment.
It feels to me like can_request_another_letter belongs as a method on Idv::GpoMail.
Contributor
There was a problem hiding this comment.
Do we care why they can't request another letter? i.e. do we want to log the profile_too_old? and rate_limited? values?
Contributor
Author
There was a problem hiding this comment.
I think that we could, yeah here, yes. I'm about to do some work on this controller to address this AC on LG-11753
The error banner for "Incorrect verification code" now is prompted under the input field as "Incorrect verification code"
I'll incorporate this thought there
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.
We have several rate limits that are enforced when the user visits the verify-by-mail code entry screen:
The enter code screen enforced these limits but did not add any indicator to the logs that it was doing so. This commit adds properties to the analytics event for each of these cases so we can monitor how the app is behaving.