feat: legacy-ios-redirect cp-7.72.0#27850
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. |
29c9ef9 to
6d189d8
Compare
6d189d8 to
6d3bbea
Compare
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Support webcredential for ios google login Part 2/4 - Add feature flag This pr add feature flag for the ios google login PR list Part 1/ 4 - #27741 Part 2/ 4 - #27848 Part 3/ 4 - #27850 Part 4/ 4 - TBA <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: added legacyIosGoogleConfigEnabled feature flag ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin 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** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: adds a new remote feature flag and selector with env override, without changing authentication flow yet; main risk is misconfiguration since the selector defaults to enabled. > > **Overview** > Adds a new remote feature flag, `legacyIosGoogleConfigEnabled`, including registry metadata and a dedicated selector `selectLegacyIosGoogleConfigEnabled` (defaulting to `true`) that can be force-overridden via `MM_LEGACY_IOS_GOOGLE_CONFIG_ENABLED`. > > Includes unit tests covering default/remote/env override behavior, and updates `babel.config.tests.js` to avoid inlining env vars for the new selector and its tests. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ca7e813. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
All seedless onboarding E2E tests (google-login-new-user, google-login-existing-user, google-login-lock-unlock, google-login-reset-wallet, apple-login tests) are tagged with Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |




Description
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/7148
Support webcredential for ios google login
Part 3/4 - Support legacy/ webcredential ios google login based on feature flag
This pr add feature flag for the ios google login
use legacy ios google login when flag is true
use webcredential ios google login when flag is false for ios > 17.4
Part 1/ 4 - #27741
Part 2/ 4 - #27848
Part 3/ 4 - #27850 (defer to 7.72.0)
Part 4/ 4 - #27875
Changelog
CHANGELOG entry: Support legacy/ webcredential ios google login based feature flag
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes OAuth login/refresh behavior and auth-connection selection for iOS Google, including new Redux-persisted client IDs and feature-flagged config switching; mistakes could break Google sign-in or token refresh on iOS.
Overview
Adds persisted seedless onboarding OAuth context to Redux (new
SET/CLEAR_SEEDLESS_ONBOARDINGactions + reducer state) and clears it when restarting onboarding or deleting/resetting a wallet.Updates iOS Google OAuth to switch between legacy iOS redirect/clientId and web/universal-link credentials via a new
getIosGoogleConfig()helper and legacy feature flag logic (with an iOS < 17.4 safety fallback), while unifying Google web constants/redirect naming.Ensures refresh-token requests on iOS Google reuse the original
client_idby reading the persisted onboarding clientId (fallbacking to legacyIosGID), and updates OAuth authentication to pick iOS vs Android auth-connection IDs based on device/clientId. Tests were expanded/updated to cover these paths (including Google prompt select-account and state reset).Written by Cursor Bugbot for commit 24579e7. This will update automatically on new commits. Configure here.