Skip to content

fix: Prompt for biometric access on iOS during wallet creation - cp-7.65.0#26002

Merged
Cal-L merged 15 commits intomainfrom
fix/25998-prompt-ios-permissions-wallet-creation
Feb 13, 2026
Merged

fix: Prompt for biometric access on iOS during wallet creation - cp-7.65.0#26002
Cal-L merged 15 commits intomainfrom
fix/25998-prompt-ios-permissions-wallet-creation

Conversation

@Cal-L
Copy link
Copy Markdown
Contributor

@Cal-L Cal-L commented Feb 12, 2026

Description

This PR addresses a regression on 7.65.0 where biometrics access is no longer prompted on wallet creation for iOS. The change here adds that back, which should result in a more intuitive user experience + makes it consistent with Android. This is an improvement relative to the code that was removed in #24496 since we're now detecting the auth type prior to the password being stored rather than triggering two storage actions.

Changelog

CHANGELOG entry:

Related issues

Fixes: #25998

Manual testing steps

Allowing biometrics

  • Will be prompted ask for biometric access on wallet creation
  • If allowed, unlock access control will be stored using biometrics
  • Future unlock triggers biometrics

Rejecting biometrics

  • Will be prompted ask for biometric access on wallet creation
  • If rejected, unlock access control will not be stored, forcing user to use password
  • Future unlock falls back to password entry

Screenshots/Recordings

Before

After

Allowing biometrics
https://github.com/user-attachments/assets/9a05e870-b1fe-465e-ba8c-6b565198ed9e

Rejecting biometrics
https://github.com/user-attachments/assets/9ce0be47-2aaf-4ce3-bf6e-c0386559546c

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Touches authentication method selection and keychain password storage/fallback paths used during onboarding/import/reset, so mistakes could impact how users are prompted and how unlock methods are persisted; changes are well-covered by updated tests but span multiple critical flows.

Overview
Restores an explicit iOS biometric prompt during wallet creation/import by introducing Authentication.requestBiometricsAccessControlForIOS and invoking it from ChoosePassword and ImportFromSecretRecoveryPhrase, falling back to PASSWORD when the user declines/cancels.

Refactors password persistence by removing updateAuthTypeStorageFlags and storePasswordWithFallback, making Authentication.storePassword public and adding an optional fallback-to-password retry used by newWalletAndKeychain/newWalletAndRestore/Reset Password. Updates OAuth rehydration and reset-password flows/tests accordingly, and adds/adjusts unit tests to cover iOS decline/success and fallback behavior.

Written by Cursor Bugbot for commit 5639099. This will update automatically on new commits. Configure here.

@Cal-L Cal-L changed the title fix: Prompt for biometric access on iOS during wallet creation fix: Prompt for biometric access on iOS during wallet creation - cp-7.65.0 Feb 12, 2026
@github-actions
Copy link
Copy Markdown
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.

@metamaskbot metamaskbot added the team-mobile-platform Mobile Platform team label Feb 12, 2026
@ieow
Copy link
Copy Markdown
Contributor

ieow commented Feb 12, 2026

We also need similar hotfix for import SRP wallet
app/components/Views/ImportFromSecretRecoveryPhrase/index.js

@github-actions github-actions bot added size-M and removed size-S labels Feb 12, 2026
@Cal-L Cal-L added No QA Needed Apply this label when your PR does not need any QA effort. needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed no changelog required No changelog entry is required for this change labels Feb 12, 2026
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Feb 12, 2026
@Cal-L Cal-L added the regression-prod-7.64.0 Regression bug that was found in production in release 7.64.0 label Feb 12, 2026
joaoloureirop
joaoloureirop previously approved these changes Feb 12, 2026
@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Feb 12, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@github-actions github-actions bot added size-XL and removed size-L labels Feb 13, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.12%. Comparing base (fdc50e0) to head (8b806f4).
⚠️ Report is 112 commits behind head on main.

Files with missing lines Patch % Lines
app/components/Views/OAuthRehydration/index.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26002      +/-   ##
==========================================
+ Coverage   80.70%   81.12%   +0.42%     
==========================================
  Files        4361     4387      +26     
  Lines      113120   113337     +217     
  Branches    24093    24339     +246     
==========================================
+ Hits        91296    91950     +654     
+ Misses      15476    15007     -469     
- Partials     6348     6380      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@ieow ieow left a comment

Choose a reason for hiding this comment

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

lgtm

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeWalletPlatform, SmokeIdentity
  • Selected Performance tags: @PerformanceOnboarding, @PerformanceLogin
  • Risk Level: high
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR makes significant changes to the core Authentication service (app/core/Authentication/Authentication.ts), which is a critical component handling password storage, biometric authentication, and wallet creation/restoration flows.

Key changes:

  1. Removed storePasswordWithFallback method - Consolidated into storePassword with a new fallbackToPassword parameter
  2. Added requestBiometricsAccessControlForIOS - New method that prompts iOS users for biometrics access control before storing credentials
  3. Modified wallet creation flows - newWalletAndKeychain and newWalletAndRestore now use the updated authentication approach
  4. Deleted updateAuthTypeStorageFlags utility - Functionality moved into Authentication service

Affected UI components:

  • ChoosePassword (wallet creation during onboarding)
  • ImportFromSecretRecoveryPhrase (SRP import flow)
  • ResetPassword (password reset flow)
  • OAuthRehydration (OAuth authentication flow)

Selected tags rationale:

  • SmokeAccounts: Tests account security, SRP protection flows, and wallet details - directly affected by authentication changes during account creation and management
  • SmokeWalletPlatform: Tests wallet lifecycle analytics for new wallet creation and SRP import events - directly affected by the modified authentication flows
  • SmokeIdentity: Tests account syncing features which depend on proper authentication - related to account management and multi-SRP flows

The changes are high risk because they modify the core authentication layer that handles password storage and biometric authentication for all wallet creation and import operations.

Performance Test Selection:
The authentication changes directly affect the onboarding flow (wallet creation and SRP import) and login/authentication mechanisms. The new requestBiometricsAccessControlForIOS method adds an additional biometric prompt step on iOS during wallet creation, which could impact onboarding performance. Changes to storePassword and the removal of storePasswordWithFallback could affect login performance as the password storage and retrieval mechanisms have been modified. These performance tests will help ensure the authentication changes don't introduce performance regressions in critical user flows.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@Cal-L Cal-L merged commit ff37603 into main Feb 13, 2026
88 of 89 checks passed
@Cal-L Cal-L deleted the fix/25998-prompt-ios-permissions-wallet-creation branch February 13, 2026 04:38
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2026
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 13, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 13, 2026
@metamaskbot metamaskbot added release-7.66.0 Issue or pull request that will be included in release 7.66.0 and removed release-7.67.0 Issue or pull request that will be included in release 7.67.0 labels Feb 23, 2026
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-7.66.0 on PR. Adding release label release-7.66.0 on PR and removing other release labels(release-7.67.0), as PR was cherry-picked in branch 7.66.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no changelog required No changelog entry is required for this change No QA Needed Apply this label when your PR does not need any QA effort. no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed regression-prod-7.64.0 Regression bug that was found in production in release 7.64.0 release-7.66.0 Issue or pull request that will be included in release 7.66.0 size-XL team-mobile-platform Mobile Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[UX Regression] Biometric permission prompt no longer shown during wallet creation onboarding

5 participants