Skip to content

LG-9118: Throttle phone verification on submit#8028

Merged
matthinz merged 9 commits intomainfrom
matthinz/9118-phone-throttle
Mar 23, 2023
Merged

LG-9118: Throttle phone verification on submit#8028
matthinz merged 9 commits intomainfrom
matthinz/9118-phone-throttle

Conversation

@matthinz
Copy link
Contributor

🎫 Ticket

LG-9118

🛠 Summary of changes

Previously we were throttling phone verification when the phone verification screen was shown rather than when the form was submitted. This PR moves throttle checks to form submission.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Sign up and start verification
  • Enter our test "failure" phone number: 703-555-5555
  • Submit that number 5 times, after which you should be blocked by the throttler

@matthinz matthinz requested a review from a team March 20, 2023 17:46
Copy link
Contributor

@solipet solipet left a comment

Choose a reason for hiding this comment

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

A couple of comments, but otherwise looks great!

Copy link
Contributor

@jmax-gsa jmax-gsa left a comment

Choose a reason for hiding this comment

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

LGTM with a small suggestion.

Moving throttle to .submit out of .async_state_done
Move it closer to the source, next to the attempts API call.
It's possible, on the user's last available attempt, for them to succeed, but leave the throttle tripped. So check for success before checking for a throttled state.
This nil return stood out like a sore thumb.
@matthinz matthinz force-pushed the matthinz/9118-phone-throttle branch from c73f084 to e812a5c Compare March 23, 2023 16:32
@matthinz matthinz merged commit 7cd2770 into main Mar 23, 2023
@matthinz matthinz deleted the matthinz/9118-phone-throttle branch March 23, 2023 16:52
@aduth aduth mentioned this pull request Mar 27, 2023
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.

3 participants