LG-12292: Perform reCAPTCHA assessment at sign-in#10772
Merged
Conversation
aduth
commented
Jun 6, 2024
app/forms/sign_in_recaptcha_form.rb
Outdated
Comment on lines
39
to
35
Contributor
Author
There was a problem hiding this comment.
This revised lookup is intended to address previous comments from proof-of-concept #10587 (comment) and #10587 (comment) (cc @mitchellhenke @zachmargolis)
82eb2cc to
807ca11
Compare
zachmargolis
approved these changes
Jun 10, 2024
mdiarra3
reviewed
Jun 12, 2024
mdiarra3
reviewed
Jun 18, 2024
mdiarra3
reviewed
Jun 18, 2024
mdiarra3
requested changes
Jun 18, 2024
Previously needed since recaptcha_token wasn't a method on SignInRecaptchaForm, but the method was added in ede24b278b
Base classes manage exemption already using score threshold, so initialize score threshold based on expected sign-in exemption cases
changelog: Upcoming Features, Spam Mitigation, Add reCAPTCHA at sign-in behind feature flag
Not strictly necessary, but safer, and avoids loading extra resources while disabled
Move short-circuit to score_threshold logic
See: #10772 (comment) Co-Authored-By: Malick Diarra <malick.diarra@gsa.gov>
dd0bdca to
112ea41
Compare
Revert to behavior more similar to how it works on main
mdiarra3
approved these changes
Jun 21, 2024
Contributor
mdiarra3
left a comment
There was a problem hiding this comment.
LGTM tested locally and worked as expected.
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.
🎫 Ticket
LG-12292
🛠 Summary of changes
Implements reCAPTCHA validation at sign-in, behind a feature flag.
This builds upon code from the previous proof-of-concept at #10587.
📜 Testing Plan
Verify that you can pass and fail reCAPTCHA validation at sign-in from a new or existing device:
Verify that there is no validation when the feature flag is disabled:
sign_in_recaptcha_score_threshold: 0.0andphone_recaptcha_mock_validator: false(rename TBD) toconfig/application.yml👀 Screenshots