Skip to content

Enforce the 13+ age requirement with Apple's Declared Age Range API - #25979

Draft
crazytonyli wants to merge 3 commits into
trunkfrom
task/cmm-2393-age-requirement-compliance
Draft

Enforce the 13+ age requirement with Apple's Declared Age Range API#25979
crazytonyli wants to merge 3 commits into
trunkfrom
task/cmm-2393-age-requirement-compliance

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes https://linear.app/a8c/issue/CMM-2393

Apple's Declared Age Range API tells apps which age range the App Store account belongs to, in the regions where age assurance laws apply. Our terms require users to be 13 or older, so the app now asks the API once after launch and refuses under-13 accounts.

The main changes:

  1. AgeRequirementCoordinator runs one check per process after WindowManager installs the signed-in or signed-out root. Only an affirmative under-13 range restricts. Declined sharing, ineligible regions, unsupported OS versions, and API errors all fail open, so this cannot lock out people the law does not cover.
  2. When restricted, AgeRequirementEnforcer shows the sign-in UI, removes the sites that have no WordPress.com account, signs out, and presents an alert. The sign-in UI goes first on purpose: the logout notification handler only shows it when it is not already showing, so this order gives one root transition instead of two.
  3. Both sign-in flows check the restriction at entry and again right before persisting the account or site, because the age result can arrive while a sign-in is in progress. A refused sign-in shows the same alert and posts no completion notification.

Every check outcome is tracked as age_requirement_check, without the age range itself.

Testing instructions

The Simulator cannot exercise the Declared Age Range service, so the check is a no-op there. To test the restriction, use a physical device on iOS 26.2 or later with a sandbox Apple Account whose age assurance is set to under 13 (Settings > Developer > Sandbox Apple Account > Manage > Age Assurance).

Regression tests on both sign-in flows are worth doing, since the persistence points in WordPressDotComAuthenticator and SelfHostedSiteAuthenticator changed.

@dangermattic

Copy link
Copy Markdown
Collaborator
2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

Copy link
Copy Markdown
Contributor

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

@crazytonyli
crazytonyli force-pushed the task/cmm-2393-age-requirement-compliance branch from d4579fc to 4c4be66 Compare September 6, 2026 22:44
@wpmobilebot

wpmobilebot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number34406
VersionPR #25979
Bundle IDorg.wordpress.alpha
Commitcef32e8
Installation URL24o65v3i15bp0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number34406
VersionPR #25979
Bundle IDcom.jetpack.alpha
Commitcef32e8
Installation URL1a94amujld1hg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@crazytonyli
crazytonyli force-pushed the task/cmm-2393-age-requirement-compliance branch from 4c4be66 to cef32e8 Compare September 7, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants