LG-12871: Remove exceptions for client-side reCAPTCHA execute #10408
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-12871
馃洜 Summary of changes
Updates client-side reCAPTCHA behavior to always invoke during client-side form submission, regardless of whether the user is exempted from backend validation.
This is based on a recommendation to improve the quality of assessments by avoiding bias toward certain subsets of users.
馃摐 Testing Plan
Prerequisite: You'll need valid reCAPTCHA keys for at least the invisible check. In local development, you can use keys generated yourself with the free version of reCAPTCHA:
config/application.yml
, adding your v3 site and secret keys. v2 values need to be present, but they don't need to be valid keys.Validate that client-side reCAPTCHA runs for all numbers, but is only validated on the backend for international numbers:
identity-idp/app/javascript/packages/captcha-submit-button/captcha-submit-button-element.ts
Line 51 in 29ba13f
binding.pry
breakpoint before this line:identity-idp/app/services/recaptcha_validator.rb
Line 46 in 29ba13f
exempt?
in your terminal breakpointfalse
if you submitted an international number, ortrue
otherwise