Skip to content

LG-11344: Prompt at most once for WebAuthn authentication#9428

Merged
aduth merged 2 commits intomainfrom
aduth-lg-11344-ft-double-prompt
Oct 23, 2023
Merged

LG-11344: Prompt at most once for WebAuthn authentication#9428
aduth merged 2 commits intomainfrom
aduth-lg-11344-ft-double-prompt

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Oct 23, 2023

🎫 Ticket

LG-11344

🛠 Summary of changes

Disables button for Face or Touch Unlock sign-in or setup when clicked, to avoid a scenario where multiple clicks due to a delay in the OS prompt may cause the user to see multiple prompt windows.

📜 Testing Plan

Sign-in:

  1. Prerequisite: Have a user with Face or Touch Unlock (see "Account creation" instructions)
  2. Go to http://localhost:3000
  3. Sign in
  4. (If directed immediately to Account page, click "Forget all browsers", confirm, then sign out and start over)
  5. When prompted for Face or Touch Unlock, click "Use face or touch unlock" multiple times very quickly, ideally before the prompt is shown
  6. Continue signing in
  7. Observe that (a) you are still able to sign-in successfully and (b) you only saw a single prompt for your credential

Account creation:

  1. Prerequisite: Use iPhone, Android, an equivalent simulation, or an environment where show_unsupported_passkey_platform_authentication_setup is true (e.g. local development)
  2. Go to http://localhost:3000
  3. Click "Create an account"
  4. Continue account creation up to MFA selection
  5. Select "Face or touch unlock" as your MFA and continue
  6. Enter a nickname
  7. Click "Continue" multiple times very quickly, ideally before the prompt is shown
  8. Continue account creation
  9. Observe that (a) you are still able to enroll the MFA successfully and (b) you only saw a single prompt for your credential

👀 Screenshots

In the screenshots below, observe that the darker button indicates the active, disabled state of the button, as implemented through SubmitButtonComponent.

Account creation:

Before After
ft-setup-before ft-setup-after

Sign in:

Before After
ft-signin-before ft-signin-after

changelog: Bug Fixes, Face or Touch Unlock, Prompt at most once when clicking submission button multiple times
@aduth aduth requested a review from a team October 23, 2023 13:05
Copy link
Contributor

@mdiarra3 mdiarra3 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kevinsmaster5 kevinsmaster5 left a comment

Choose a reason for hiding this comment

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

It looks good. Local test confirmed working as expected.

@aduth aduth merged commit 10ab9b3 into main Oct 23, 2023
@aduth aduth deleted the aduth-lg-11344-ft-double-prompt branch October 23, 2023 19:41
@mdiarra3 mdiarra3 mentioned this pull request Oct 26, 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.

4 participants