feat: TO-541 - Integrate passkey in onboarding and unlock page#42169
feat: TO-541 - Integrate passkey in onboarding and unlock page#42169tanguyenvn wants to merge 13 commits intofeat/TO-541-passkey-unlockfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨📜 @MetaMask/policy-reviewers (12 files, +168 -0)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🔐 @MetaMask/web3auth (6 files, +733 -3)
|
Builds ready [b5b6fd0]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [d5b9d36]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
d5b9d36 to
d7eac43
Compare
Builds ready [d7eac43]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [e1bde4f]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [4e6a0ef]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
4e6a0ef to
5e9f8f2
Compare
Builds ready [1b15cec]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [707bc60]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| (firstTimeFlowType === FirstTimeFlowType.import || | ||
| firstTimeFlowType === FirstTimeFlowType.create) | ||
| ) { | ||
| navigate(ONBOARDING_SETUP_PASSKEY_ROUTE, { replace: true }); |
There was a problem hiding this comment.
should not allow in sidepanel mode
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 259b5ea. Configure here.
| </Button> | ||
| </Box> | ||
| </form> | ||
| )} |
There was a problem hiding this comment.
Passkey unlock view missing form wrapper breaks keyboard submission
Low Severity
When showPasswordUnlockForm is false, the passkey view is rendered as a plain Box instead of a form. The outer Box with asChild (line 809) expects to merge its props — including data-testid="unlock-page" — into its single child. The password branch is a <form> so asChild works naturally, but the passkey branch is a non-form <Box> that still receives the form-related context from the parent. More importantly, the "Unlock with biometrics" button will never be reachable via Enter/keyboard submission since there is no <form> and the button is type="button".
Reviewed by Cursor Bugbot for commit 259b5ea. Configure here.
|
|
||
| if (isFirefox || isSocialLoginFlow) { | ||
| if (isPasskeyFeatureAvailable && !isSocialLoginFlow) { | ||
| navigate(ONBOARDING_SETUP_PASSKEY_ROUTE, { replace: true }); |
There was a problem hiding this comment.
Redundant isSocialLoginFlow guard masks intent of passkey check
Low Severity
isPasskeyFeatureAvailable && !isSocialLoginFlow is redundant — getIsPasskeyFeatureAvailable already includes !getIsSocialLoginFlow(state) internally. This same redundancy appears in the unlock page container where isPasskeyActive combines getIsPasskeyFeatureAvailable(state) with !isSocialLoginFlow. The double-checking obscures the actual invariant and could mislead future maintainers into thinking the inner check might be absent.
Reviewed by Cursor Bugbot for commit 259b5ea. Configure here.
|
Builds ready [259b5ea]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|





Description
This PR adds the initial passkey (biometric/WebAuthn) experience across onboarding and unlock flows, and wires the background/controller APIs needed to register, authenticate, and manage passkeys safely.
Context
Solution
Changelog
CHANGELOG entry: Added passkey setup during onboarding and passkey-based unlock with password fallback.
Related issues
Fixes: TO-541
Manual testing steps
PASSKEY_ENABLED=true) and run the extension.Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
High Risk
Adds a new WebAuthn/passkey unlock path and related background RPC actions, affecting core authentication/unlock behavior and onboarding routing. Risk comes from changes to lock/unlock flows, auto-unlock behavior, and new error/feature-gating logic across multiple surfaces.
Overview
Adds a new onboarding step at
ONBOARDING_SETUP_PASSKEY_ROUTEthat lets users enroll biometrics/passkeys (or skip via Maybe later), and updatesCreatePassword/OnboardingFlowrouting to insert this step when the passkey feature is available and not yet registered.Updates the unlock UI to support passkey unlocking (including optional auto-attempt when eligible and not suppressed), fallback to password via Use password, sidepanel troubleshooting that opens the full-screen unlock route, and localized passkey error messaging/metrics.
Introduces new selectors (
getIsPasskeyFeatureAvailable,getIsPasskeyRegistered), new background-facing actions for passkey registration/authentication and passkey-verified password change/removal, and updates LavaMoat policies plus i18n strings to allow/use@simplewebauthn/browserand new UI copy.Reviewed by Cursor Bugbot for commit 259b5ea. Bugbot is set up for automated code reviews on this repo. Configure here.