fix: onboarding completion page guard#40012
Merged
Conversation
Contributor
|
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. |
Contributor
✨ Files requiring CODEOWNER review ✨🔐 @MetaMask/web3auth (2 files, +33 -0)
|
Contributor
Builds ready [115ac3c]
UI Startup Metrics (1392 ± 96 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Member
|
I think we should also add guard to |
tuna1207
approved these changes
Feb 12, 2026
smgv
approved these changes
Feb 13, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Users can bypass the entire onboarding flow by navigating directly to the completion route (
#/onboarding/completion), rendering theCreationSuccessfulcomponent without having created a wallet. Clicking "Open wallet" then callscompleteOnboarding(), marking onboarding as complete even though the KeyringController vault was never created. This leads to an inconsistent state where the extension appears onboarded but has no wallet, causing errors when trying to unlock.This PR adds a guard to the
CreationSuccessfulcomponent that checks whether the wallet has been initialized (isInitialized). If the wallet is not initialized and the user is not arriving from a settings reminder, they are redirected back to the onboarding welcome page. This prevents users from skipping mandatory onboarding steps by directly manipulating route URLs.Changelog
CHANGELOG entry: Fixed a security issue where users could skip onboarding by navigating directly to the completion route
Related issues
Fixes: #37079
Manual testing steps
chrome-extension://<extension-id>/home.html#/onboarding/completion?isFromReminder=true)Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist