Skip to content

fix(auth): stop syncing marketing consent with the OAuth backend (GE-648) - #47808

Merged
zelkibuilds merged 4 commits into
mainfrom
fix/stop-syncing-marketing-consent-with-oauth-backend
Nov 12, 2026
Merged

zelkibuilds merged 4 commits into
mainfrom
fix/stop-syncing-marketing-consent-with-oauth-backend

Conversation

@zelkibuilds

@zelkibuilds zelkibuilds commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

Social login (Google/Apple) users had marketing consent also read from and written to the OAuth auth server (OAuthService:getMarketingConsent / OAuthService:setMarketingConsent, endpoint /api/v1/oauth/marketing_opt_in_status). When setting marketing consent on the OAuth BE fails the Settings toggle flipped and then snapped back and Braze has_marketing_consent went out of sync. More importantly it prevents opted-in users from opting out which is a legal/compliance issue.

Temporary hotfix aligned with mobile. Reads are removed and writes are kept without the revert: social login consent lives locally in AnalyticsController state (optedInToMarketing, marketingConsentDecisionMade) as the source of truth, and every consent write also POSTs to the auth server so email marketing learns of opt-ins and opt-outs. SRP users keep behaving as before, with no marketing request. Based on main, not on feat/marketing-consent-aus-sync. The proper long-term fix, moving consent to Authenticated User Storage and removing the OAuth methods, is #47041.

Changes

  • ui/pages/settings/privacy-tab/data-collection-item.tsx removed the mount-time fetch of remote consent (the read that could overwrite the local choice). The toggle keeps dispatching optInToMarketing/optOutOfMarketing locally and, for social login users, also calls setMarketingConsent fire-and-forget: a failed sync is logged and the local decision is never reverted, so the toggle no longer snaps back.
  • ui/pages/onboarding-flow/create-password/create-password.tsx keeps setMarketingConsent(true) on social login wallet creation as on main (before this PR it was removed). The local opt in/out dispatch and the AnalyticsPreferenceSelected event stay.
  • ui/components/app/metametrics-consent/metametrics-consent-container.tsx (the consent modal shown again to restored social login users because reads are gone) now also POSTs the user's choice (accept, decline and close) for social login users, without the revert. Non-social users do not POST.
  • ui/store/actions.ts restoreSocialBackupAndGetSeedPhrase no longer reads consent after a social restore, no longer dispatches opt in/out from it, and no longer tracks AnalyticsPreferenceSelected with location onboarding_social_login_rehydration. The now unused trackEvent param is dropped and onboarding-flow.tsx is updated (unused trackLegacyEventForAction/useAnalytics removed).
  • The UI action helper getMarketingConsent and the OAuthService background read method are intentionally kept with no callers, to keep this easy to revert. setMarketingConsent is called again as a write-only sync (no revert on failure).
  • e2e test/e2e/tests/seedless-onboarding/refresh-auth-tokens.spec.ts used the marketing request as its probe for the refreshed access token. Replaced with the social identifier pairing request (/api/v2/profile/pair/identifier, body social_jwt), which also carries the refreshed token. Removed the marketing GET mock, kept a marketing POST mock (consent writes still happen), and added a pairing mock. The two original tests are rewritten as two: one asserts the expired token was renewed, one asserts the refreshed token was used in later requests. The pairing request fires in e2e because the onboarding flow accepts the basic functionality migration modal, which sets isBasicFunctionalityConsolidatedEnabled. This approach is borrowed from feat(analytics): move social login marketing consent from OAuth to AUS (GE-589) #47041. The e2e spec was not run locally.

Behavior changes and risks

  • Existing consent stored on the auth server is no longer read, so those values go stale until the user's next local consent write.
  • Social login users on a new device or after reinstall start with consent unset and see the home MetaMetricsConsentContainer modal again; answering it now also POSTs the choice to the auth server.
  • A consent write that fails is logged and not retried, so the auth server can miss the latest choice until the next toggle. The local decision is never reverted, which fixes the compliance bug where a failed opt-out snapped the toggle back.
  • The AnalyticsPreferenceSelected event with location onboarding_social_login_rehydration is no longer emitted.

Verification (Node 24.22.1)

  • yarn jest on data-collection-item, metametrics-consent-container, create-password and actions.test.js: 4 suites, 293 tests pass (including new cases asserting the POST is sent for social users, not sent for SRP users, and that a failed sync does not revert the local choice).
  • yarn lint:tsc passes (TypeScript 5.9.3).
  • yarn lint:eslint on the whole repo, 0 errors. oxfmt check clean on the touched files.
  • Not run: e2e spec, manual testing in a built extension.

Changelog

CHANGELOG entry: Fixed marketing consent for social login users failing to save and snapping back in Settings

Related issues

Refs: #47041

Mobile counterpart: MetaMask/metamask-mobile#39376

Manual testing steps

  1. Sign in with Google or Apple, open Settings > Security & privacy, flip the marketing toggle on and off. It stays where it is set and does not snap back; each flip sends one POST (no GET) to /api/v1/oauth/marketing_opt_in_status with the new value.
  2. Create a new wallet with social login and tick the marketing checkbox. Consent is on locally and one POST with is_opt_in: true is sent to the auth server.
  3. Log out and restore via social login. Local consent is unchanged, no marketing GET is made, and answering the MetaMetricsConsentContainer modal sends one POST with the chosen value.
  4. SRP user toggle unchanged: no marketing request is made.

Screenshots/Recordings

Before

N/A

After

N/A

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 social-login marketing consent and OAuth sync paths where opt-out correctness is compliance-sensitive; behavior change leaves server-side consent stale until the user toggles again.

Overview
Social-login marketing consent no longer pulls from the OAuth auth server on restore, in Settings, or via restoreSocialBackupAndGetSeedPhrase—local AnalyticsController state is the source of truth so failed reads cannot flip the toggle back (compliance fix).

Writes remain: social users still POST consent on Settings toggle, MetaMetrics consent modal (accept/decline/close), and related flows via setMarketingConsent, without reverting local state if the network call fails.

onboarding-flow drops the unused analytics callback when restoring social backup. Seedless e2e token-refresh tests now assert refresh via social identifier pairing (PairSocialIdentifier / social_jwt) instead of marketing opt-in traffic; mocks add pairing and simplify marketing to POST-only.

Reviewed by Cursor Bugbot for commit 76f316c. Bugbot is set up for automated code reviews on this repo. Configure here.

@zelkibuilds zelkibuilds self-assigned this Nov 10, 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.

@metamask-ci

metamask-ci Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (2 files, +41 -34)
  • 📁 ui/
    • 📁 pages/
      • 📁 settings/
        • 📁 privacy-tab/
          • 📄 data-collection-item.test.tsx +36 -11
          • 📄 data-collection-item.tsx +5 -23

🔐 @MetaMask/web3auth (2 files, +41 -34)
  • 📁 ui/
    • 📁 pages/
      • 📁 onboarding-flow/
        • 📁 create-password/
          • 📄 create-password.test.tsx +39 -0
          • 📄 onboarding-flow.tsx +2 -34

@metamask-ci

metamask-ci Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor
Builds ready [662efab]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)

Baseline (latest main): f693520 | Date: 11/3/2026 | Pipeline: 42852652553 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 3 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ loadNewAccount/load_new_account: +179%
  • ↑ loadNewAccount/total: +179%
  • ↓ loadNewAccount/inp: -40%
  • ↓ loadNewAccount/fcp: -30%
  • ↑ loadNewAccount/lcp: +589%
  • ↑ loadNewAccount/cls: +596%
  • ↑ confirmTx/longTaskCount: +33%
  • ↓ confirmTx/tbt: -14%
  • ↓ confirmTx/inp: -52%
  • ↓ confirmTx/fcp: -34%
  • ↑ confirmTx/lcp: +566%
  • ↓ bridgeUserActions/bridge_load_asset_picker: -20%
  • ↓ bridgeUserActions/longTaskTotalDuration: -35%
  • ↓ bridgeUserActions/longTaskMaxDuration: -39%
  • ↓ bridgeUserActions/tbt: -73%
  • ↓ bridgeUserActions/total: -11%
  • ↓ bridgeUserActions/inp: -41%
  • ↓ bridgeUserActions/fcp: -32%
  • ↑ bridgeUserActions/lcp: +570%
  • ↑ bridgeUserActions/cls: +634%
  • ↑ loadNewAccount/load_new_account: +182%
  • ↑ loadNewAccount/total: +182%
  • ↓ loadNewAccount/inp: -33%
  • ↑ loadNewAccount/lcp: +1096%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -29%
  • ↑ confirmTx/lcp: +1118%
  • ↑ bridgeUserActions/bridge_load_page: +141%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +93%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +18%
  • ↑ bridgeUserActions/inp: +40%
  • ↓ bridgeUserActions/fcp: -46%
  • ↑ bridgeUserActions/lcp: +1094%
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/uiStartup: +45%
  • ↑ startupStandardHome/load: +71%
  • ↑ startupStandardHome/domContentLoaded: +71%
  • ↓ startupStandardHome/firstPaint: -45%
  • ↓ startupStandardHome/backgroundConnect: -16%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -64%
  • ↑ startupStandardHome/loadScripts: +69%
  • ↑ startupStandardHome/setupStore: +75%
  • ↑ startupStandardHome/longTaskTotalDuration: +67%
  • ↑ startupStandardHome/longTaskMaxDuration: +84%
  • ↑ startupStandardHome/tbt: +82%
  • ↓ startupStandardHome/inp: -18%
  • ↑ startupStandardHome/fcp: +15%
  • ↑ startupStandardHome/lcp: +415%
  • ↓ startupStandardHome/cls: -72%
  • ↑ startupStandardHome/domInteractive: +46%
  • ↓ startupStandardHome/firstReactRender: -99%
  • ↓ startupStandardHome/initialActions: -50%
  • ↑ startupStandardHome/fcp: +49%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/srpButtonToSrpForm: -11%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -92%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -74%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -85%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +17%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +10%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -67%
  • ↓ onboardingNewWallet/longTaskCount: -62%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -74%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -37%
  • ↓ onboardingNewWallet/tbt: -100%
  • ↓ onboardingNewWallet/total: -63%
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ dappPageLoad/pageLoadTime: -67%
  • ↓ dappPageLoad/domContentLoaded: -34%
  • ↓ dappPageLoad/firstPaint: -52%
  • ↓ dappPageLoad/firstContentfulPaint: -52%
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
Status Bundle Total Diff Change
✅ background 15.21 MiB +184 Bytes 0.00%
🚨 ui 19.48 MiB +6.2 KiB +0.03%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.46 MiB +69 Bytes 0.00%
✅ content scripts 3.22 MiB +138 Bytes 0.00%
🚨 unzipped 79.9 MiB +6.05 KiB +0.01%
✅ zip 24.01 MiB +615 Bytes 0.00%

@metamask-ci

metamask-ci Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor
Builds ready [d4dccf2] [reused from 662efab]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)

Baseline (latest main): f693520 | Date: 11/3/2026 | Pipeline: 42871985211 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 3 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ loadNewAccount/load_new_account: +179%
  • ↑ loadNewAccount/total: +179%
  • ↓ loadNewAccount/inp: -40%
  • ↓ loadNewAccount/fcp: -30%
  • ↑ loadNewAccount/lcp: +589%
  • ↑ loadNewAccount/cls: +596%
  • ↑ confirmTx/longTaskCount: +33%
  • ↓ confirmTx/tbt: -14%
  • ↓ confirmTx/inp: -52%
  • ↓ confirmTx/fcp: -34%
  • ↑ confirmTx/lcp: +566%
  • ↓ bridgeUserActions/bridge_load_asset_picker: -20%
  • ↓ bridgeUserActions/longTaskTotalDuration: -35%
  • ↓ bridgeUserActions/longTaskMaxDuration: -39%
  • ↓ bridgeUserActions/tbt: -73%
  • ↓ bridgeUserActions/total: -11%
  • ↓ bridgeUserActions/inp: -41%
  • ↓ bridgeUserActions/fcp: -32%
  • ↑ bridgeUserActions/lcp: +570%
  • ↑ bridgeUserActions/cls: +634%
  • ↑ loadNewAccount/load_new_account: +182%
  • ↑ loadNewAccount/total: +182%
  • ↓ loadNewAccount/inp: -33%
  • ↑ loadNewAccount/lcp: +1096%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -29%
  • ↑ confirmTx/lcp: +1118%
  • ↑ bridgeUserActions/bridge_load_page: +141%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +93%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +18%
  • ↑ bridgeUserActions/inp: +40%
  • ↓ bridgeUserActions/fcp: -46%
  • ↑ bridgeUserActions/lcp: +1094%
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/uiStartup: +45%
  • ↑ startupStandardHome/load: +71%
  • ↑ startupStandardHome/domContentLoaded: +71%
  • ↓ startupStandardHome/firstPaint: -45%
  • ↓ startupStandardHome/backgroundConnect: -16%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -64%
  • ↑ startupStandardHome/loadScripts: +69%
  • ↑ startupStandardHome/setupStore: +75%
  • ↑ startupStandardHome/longTaskTotalDuration: +67%
  • ↑ startupStandardHome/longTaskMaxDuration: +84%
  • ↑ startupStandardHome/tbt: +82%
  • ↓ startupStandardHome/inp: -18%
  • ↑ startupStandardHome/fcp: +15%
  • ↑ startupStandardHome/lcp: +415%
  • ↓ startupStandardHome/cls: -72%
  • ↑ startupStandardHome/domInteractive: +46%
  • ↓ startupStandardHome/firstReactRender: -99%
  • ↓ startupStandardHome/initialActions: -50%
  • ↑ startupStandardHome/fcp: +49%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/srpButtonToSrpForm: -11%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -92%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -74%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -85%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +17%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +10%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -67%
  • ↓ onboardingNewWallet/longTaskCount: -62%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -74%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -37%
  • ↓ onboardingNewWallet/tbt: -100%
  • ↓ onboardingNewWallet/total: -63%
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ dappPageLoad/pageLoadTime: -67%
  • ↓ dappPageLoad/domContentLoaded: -34%
  • ↓ dappPageLoad/firstPaint: -52%
  • ↓ dappPageLoad/firstContentfulPaint: -52%
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
Status Bundle Total Diff Change
✅ background 15.21 MiB +184 Bytes 0.00%
🚨 ui 19.48 MiB +6.2 KiB +0.03%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.46 MiB +69 Bytes 0.00%
✅ content scripts 3.22 MiB +138 Bytes 0.00%
🚨 unzipped 79.9 MiB +6.05 KiB +0.01%
✅ zip 24.01 MiB +615 Bytes 0.00%

@zelkibuilds
zelkibuilds marked this pull request as ready for review November 10, 2026 18:33
@zelkibuilds
zelkibuilds requested review from a team as code owners November 10, 2026 18:33
@zelkibuilds zelkibuilds changed the title fix(auth): stop syncing marketing consent with the OAuth backend fix(auth): stop syncing marketing consent with the OAuth backend (GE-648) Nov 10, 2026
Comment thread ui/store/actions.ts
);

// sync marketing consent with metametrics
const marketingConsent = await getMarketingConsent();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cross-device consent regression.
On a fresh-device social restore, the code previously force-synced local consent from the backend; now nothing sets it, so a user who previously opted in will show opted-out locally until they toggle again. Privacy-conservative, but it's a real behavior change on the rehydration path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change is intentional, we're okay with losing cross-device marketing consent state for social login users until we move marketing consent to AUS (when the decoupling of marketing consent from metametrics lands)

);

if (termsChecked) {
dispatch(setMarketingConsent(true));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This previously save the user's marketing consent in the auth-service backend.
Now, it was removed.

May I know where is it stored now? (Probably please point me to the code ref).

This will affect cross-device marketing consent for the social login user.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We've reverted our approach to this hotfix and instead of cutting off the BE calls altogether we're mostly going to prevent rollbacks on failed remote writes.

@ameliejyc

Copy link
Copy Markdown
Contributor

Not sure if this is an issue but Cursor flagged this:

It does not fix email. OAuthService:setMarketingConsent takes hasEmailMarketingConsent and posts opt_in_status. The social Settings string still says "including by email". After this PR nothing writes that endpoint, including a new wallet whose marketing box is checked. create-password already skipped the write when the box was unchecked, so an opt-out never reached the server unless a later Settings toggle succeeded. If the mailer reads is_opt_in, opted-out users keep getting email, which is the compliance bug this PR is trying to close. If Braze is the only sender and it keys off has_marketing_consent, the hotfix is sufficient and the OAuth record going stale is acceptable until #47041.

@zelkibuilds

Copy link
Copy Markdown
Contributor Author

Not sure if this is an issue but Cursor flagged this:

It does not fix email. OAuthService:setMarketingConsent takes hasEmailMarketingConsent and posts opt_in_status. The social Settings string still says "including by email". After this PR nothing writes that endpoint, including a new wallet whose marketing box is checked. create-password already skipped the write when the box was unchecked, so an opt-out never reached the server unless a later Settings toggle succeeded. If the mailer reads is_opt_in, opted-out users keep getting email, which is the compliance bug this PR is trying to close. If Braze is the only sender and it keys off has_marketing_consent, the hotfix is sufficient and the OAuth record going stale is acceptable until #47041.

Thanks, that write is now restored in 6bbbe07. We've reverted our approach to this hotfix and instead of cutting off the BE calls altogether we're mostly going to prevent rollbacks on failed remote writes.

lwin-kyaw
lwin-kyaw previously approved these changes Nov 12, 2026
…eting-consent-with-oauth-backend

# Conflicts:
#	test/e2e/tests/seedless-onboarding/refresh-auth-tokens.spec.ts
@metamask-ci

metamask-ci Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor
Builds ready [76f316c]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 2 warn · 🔴 3 fail)

Baseline (latest main): f693520 | Date: 11/3/2026 | Pipeline: 43218355523 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 3 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ loadNewAccount/load_new_account: +183%
  • ↑ loadNewAccount/total: +183%
  • ↓ loadNewAccount/inp: -25%
  • ↑ loadNewAccount/lcp: +897%
  • ↑ loadNewAccount/cls: +596%
  • ↑ confirmTx/longTaskCount: +33%
  • ↑ confirmTx/longTaskTotalDuration: +46%
  • ↑ confirmTx/longTaskMaxDuration: +47%
  • ↑ confirmTx/tbt: +56%
  • ↓ confirmTx/inp: -21%
  • ↑ confirmTx/fcp: +21%
  • ↑ confirmTx/lcp: +1113%
  • ↓ confirmTx/cls: -14%
  • ↑ bridgeUserActions/bridge_load_page: +113%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +21%
  • ↑ bridgeUserActions/longTaskCount: +36%
  • ↑ bridgeUserActions/longTaskTotalDuration: +63%
  • ↑ bridgeUserActions/tbt: +106%
  • ↑ bridgeUserActions/total: +19%
  • ↑ bridgeUserActions/lcp: +891%
  • ↑ bridgeUserActions/cls: +387%
  • ↑ loadNewAccount/load_new_account: +180%
  • ↑ loadNewAccount/total: +180%
  • ↓ loadNewAccount/inp: -10%
  • ↓ loadNewAccount/fcp: -60%
  • ↑ loadNewAccount/lcp: +1006%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -29%
  • ↓ confirmTx/fcp: -52%
  • ↑ confirmTx/lcp: +1027%
  • ↑ bridgeUserActions/bridge_load_page: +159%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +54%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +18%
  • ↑ bridgeUserActions/inp: +32%
  • ↓ bridgeUserActions/fcp: -61%
  • ↑ bridgeUserActions/lcp: +1116%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 confirmTx/FCP: p75 2.1s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/uiStartup: +89%
  • ↑ startupStandardHome/load: +125%
  • ↑ startupStandardHome/domContentLoaded: +126%
  • ↑ startupStandardHome/domInteractive: +29%
  • ↓ startupStandardHome/firstPaint: -55%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -29%
  • ↑ startupStandardHome/loadScripts: +124%
  • ↑ startupStandardHome/setupStore: +121%
  • ↑ startupStandardHome/numNetworkReqs: +11%
  • ↑ startupStandardHome/longTaskCount: +79%
  • ↑ startupStandardHome/longTaskTotalDuration: +123%
  • ↑ startupStandardHome/longTaskMaxDuration: +126%
  • ↑ startupStandardHome/tbt: +145%
  • ↓ startupStandardHome/fcp: -47%
  • ↑ startupStandardHome/lcp: +136%
  • ↓ startupStandardHome/cls: -72%
  • ↑ startupStandardHome/backgroundConnect: +13%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -50%
  • ↑ startupStandardHome/lcp: +10%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/srpButtonToSrpForm: -15%
  • ↓ onboardingImportWallet/metricsToWalletReadyScreen: -36%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -92%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -74%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -86%
  • ↓ onboardingNewWallet/createWalletToSocialScreen: -13%
  • ↓ onboardingNewWallet/srpButtonToPwForm: -36%
  • ↓ onboardingNewWallet/createPwToRecoveryScreen: -22%
  • ↓ onboardingNewWallet/skipBackupToMetricsScreen: -20%
  • ↓ onboardingNewWallet/agreeButtonToOnboardingSuccess: -53%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -75%
  • ↓ onboardingNewWallet/longTaskCount: -100%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -100%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -100%
  • ↓ onboardingNewWallet/tbt: -100%
  • ↓ onboardingNewWallet/total: -72%
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ dappPageLoad/pageLoadTime: -67%
  • ↓ dappPageLoad/domContentLoaded: -33%
  • ↓ dappPageLoad/firstPaint: -52%
  • ↓ dappPageLoad/firstContentfulPaint: -52%
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
Status Bundle Total Diff Change
✅ background 15.22 MiB +806 Bytes +0.01%
🚨 ui 19.54 MiB +40.99 KiB +0.21%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.46 MiB +76 Bytes 0.00%
✅ content scripts 3.22 MiB +152 Bytes 0.00%
🚨 unzipped 79.97 MiB +43.51 KiB +0.05%
🚨 zip 24.03 MiB +14.61 KiB +0.06%

@sonarqubecloud

Copy link
Copy Markdown

@zelkibuilds
zelkibuilds added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit d6e9b87 Nov 12, 2026
140 checks passed
@zelkibuilds
zelkibuilds deleted the fix/stop-syncing-marketing-consent-with-oauth-backend branch November 12, 2026 17:18
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026
@metamaskbot metamaskbot added the release-13.58.0 Issue or pull request that will be included in release 13.58.0 label Nov 16, 2026

This branch was previously deployed

1 inactive deployment
pr-comment — 76f316cd Deployed Nov 12, 2026 by zelkibuilds via Publish prerelease / Publish prerelease #174300
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.58.0 Issue or pull request that will be included in release 13.58.0 size-L team-engagement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants