Skip to content

Fix reCAPTCHA add phone fallback links#9110

Merged
aduth merged 2 commits intomainfrom
aduth-recaptcha-fallback-links
Aug 29, 2023
Merged

Fix reCAPTCHA add phone fallback links#9110
aduth merged 2 commits intomainfrom
aduth-recaptcha-fallback-links

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 29, 2023

🛠 Summary of changes

Fixes an issue where the reCAPTCHA fallback screen shows incorrect links when adding a phone number to an existing account.

This was an unintended side-effect of the phone consolidation in #8966, since the links were controlled by distinct logic in the two controllers, where one would provide locals value to the view to render a link to "Choose another authentication method":

render 'users/phone_setup/spam_protection'

render :spam_protection, locals: { authentication_methods_setup_path: }

There was not sufficient regression coverage for this behavior, hence why it was not caught previously.

📜 Testing Plan

  1. Go to http://localhost:3000
  2. Create an account
  3. Select phone as MFA during setup
  4. At phone setup screen, use phone number +610491570006 and assign a score 0.4
  5. Click "Send code"
  6. Observe in fallback screen the "Choose another authentication method" link. Optionally click it to return to MFA selection screen.
  7. Continue account creation.
  8. Once account is created, click "Add phone number" from account dashboard
  9. At phone setup screen, use phone number +610491570156 and assign a score 0.4
  10. Click "Send code"
  11. Observe no "Choose another authentication method" link. Instead, see link to "Cancel" to return to account dashboard.

👀 Screenshots

Screen Before After
New Account Fallback Screenshot 2023-08-29 at 8 28 49 AM Screenshot 2023-08-29 at 8 28 49 AM
Existing Account Fallback Screenshot 2023-08-29 at 8 28 49 AM Screenshot 2023-08-29 at 8 28 38 AM

changelog: Upcoming Features, Phone Fraud Protection, Show correct links for phone challenge fallback when adding to existing account
@aduth aduth requested a review from a team August 29, 2023 12:34
@aduth aduth merged commit a4dba52 into main Aug 29, 2023
@aduth aduth deleted the aduth-recaptcha-fallback-links branch August 29, 2023 13:38
@mdiarra3 mdiarra3 mentioned this pull request Aug 29, 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.

2 participants