Skip to content

fix: support webcredentials cp-7.71.0#27741

Merged
ieow merged 3 commits into
mainfrom
cw/webcredentials
Mar 24, 2026
Merged

fix: support webcredentials cp-7.71.0#27741
ieow merged 3 commits into
mainfrom
cw/webcredentials

Conversation

@ieow
Copy link
Copy Markdown
Contributor

@ieow ieow commented Mar 20, 2026

Description

This pr patch the expo-web-browser to support https redirect schema
Taking reference from expo-web-browser sdk 55
https://github.com/expo/expo/blob/308031a6665f885811760aff7aebb68aea4a846a/packages/expo-web-browser/ios/WebAuthSession.swift#L36

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/7148

PR list
Part 1/ 4 - #27741
Part 2/ 4 - #27848
Part 3/ 4 - #27850
Part 4/ 4 - #27875

Changelog

CHANGELOG entry: expo-web-browser support https redirect scheme
CHANGELOG entry: use webcredential for ios google login

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

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
Moderate risk because it changes iOS ASWebAuthenticationSession callback configuration and entitlements, which can affect login/redirect flows and associated-domain behavior.

Overview
Enables HTTPS redirect-based auth callbacks on iOS by patching expo-web-browser’s WebAuthSession to use iOS 17.4+/macOS 14.4+ .https(host:path) callbacks when the redirectUrl is https, falling back to the legacy callbackURLScheme behavior otherwise.

Updates iOS entitlements (MetaMask.entitlements and MetaMaskDebug.entitlements) to include webcredentials:link.metamask.io, and wires the patch into the build via a Yarn resolutions entry plus corresponding yarn.lock changes.

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

@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-onboarding Onboarding team label Mar 20, 2026
Copy link
Copy Markdown
Contributor

@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 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread app/core/OAuthService/OAuthLoginHandlers/index.ts Outdated
Comment thread app/core/OAuthService/OAuthLoginHandlers/index.ts Outdated
@ieow ieow marked this pull request as ready for review March 20, 2026 16:10
@ieow ieow requested review from a team as code owners March 20, 2026 16:10
@ieow ieow mentioned this pull request Mar 20, 2026
7 tasks
@ieow ieow enabled auto-merge March 20, 2026 16:37
@ieow ieow disabled auto-merge March 20, 2026 16:37
@ieow ieow changed the title fix: support webcredentials fix: support webcredentials cp-7.71.0 Mar 20, 2026
Cal-L
Cal-L previously approved these changes Mar 20, 2026
Copy link
Copy Markdown
Contributor

@Cal-L Cal-L 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 github-actions Bot added the risk-low Low testing needed · Low bug introduction risk label Mar 24, 2026
@ieow
Copy link
Copy Markdown
Contributor Author

ieow commented Mar 24, 2026

revert the ios client id so that this pr is purely package patch update.
the client id will be updated in next pr

@ieow ieow enabled auto-merge March 24, 2026 06:10
@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Mar 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes in this PR are:

  1. expo-web-browser patch: Patches WebAuthSession.swift in expo-web-browser to support iOS 17.4+ HTTPS-based callbacks for ASWebAuthenticationSession. This is a low-level iOS native improvement for web authentication sessions. No direct app code imports expo-web-browser (grep found zero matches), so it's a transitive dependency fix.

  2. iOS entitlements: Adds webcredentials:link.metamask.io to both production and debug entitlements. This enables password autofill / passkey (WebAuthn) support for the link.metamask.io domain on iOS.

  3. yarn.lock / package.json: Dependency resolution changes to apply the patch.

These are iOS-specific infrastructure changes with no modifications to app logic, UI components, controllers, or test infrastructure. The changes improve web authentication session handling on newer iOS versions and add webcredentials domain association. No existing E2E tests cover ASWebAuthenticationSession flows or webcredentials directly. The risk is low — these are additive changes that don't modify existing behavior for older iOS versions (the patch uses #available(iOS 17.4, *) guard). No performance impact is expected.

Performance Test Selection:
No performance-sensitive code paths are modified. These are iOS entitlement and native web auth session changes with no impact on rendering, data loading, or app startup performance.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@ieow ieow added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit a2f8164 Mar 24, 2026
60 of 62 checks passed
@ieow ieow deleted the cw/webcredentials branch March 24, 2026 09:38
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 24, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 risk-low Low testing needed · Low bug introduction risk size-S team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants