Skip to content

Block the app with a sign-in gate when the WordPress.com token is missing - #26130

Draft
crazytonyli wants to merge 2 commits into
task/wpcom-token-less-account-fixesfrom
task/wpcom-reauthentication-gate
Draft

crazytonyli wants to merge 2 commits into
task/wpcom-token-less-account-fixesfrom
task/wpcom-reauthentication-gate

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Users can currently cancel WordPress.com sign-in and keep using the app with no token. Cached content still looks available, but requests fail. The fallback "Log out / Sign In" alert can be dropped when the root view controller is already presenting something, such as the "Your Sites" tip.

The app now shows a blocking screen offering Sign In and Log out until the account has a token again or is removed. Cancelling web sign-in returns to this screen, keeping the recovery options available.

The screen uses WindowManager's overlaying window so existing presentations cannot hide it. It also checks at launch and on foreground: relying on an API request to trigger sign-in misses users whose screens never access the v1 API getter.

@dangermattic

dangermattic commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Oct 12, 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 Number34902
VersionPR #26130
Bundle IDorg.wordpress.alpha
Commit0187850
Installation URL1abp62iih9p58
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Oct 12, 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 Number34902
VersionPR #26130
Bundle IDcom.jetpack.alpha
Commit0187850
Installation URL1s1330bv0iltg
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/wpcom-reauthentication-gate branch from a4b3968 to f9a4f7a Compare October 13, 2026 00:39
@crazytonyli
crazytonyli changed the base branch from trunk to task/wpcom-token-less-account-fixes October 13, 2026 00:58
@crazytonyli
crazytonyli added this pull request to stack #26133 October 13, 2026 01:09
@crazytonyli
crazytonyli force-pushed the task/wpcom-reauthentication-gate branch from f9a4f7a to 763d7d3 Compare October 13, 2026 01:20
@crazytonyli
crazytonyli requested a review from jkmassel October 13, 2026 01:32
@crazytonyli crazytonyli added this to the 27.4 milestone Oct 13, 2026
@crazytonyli
crazytonyli marked this pull request as ready for review October 13, 2026 01:33
@crazytonyli
crazytonyli force-pushed the task/wpcom-reauthentication-gate branch from 763d7d3 to 0187850 Compare October 13, 2026 01:33
@wpmobilebot wpmobilebot modified the milestones: 27.4, 27.5 Oct 20, 2026
@wpmobilebot

Copy link
Copy Markdown
Contributor

Version 27.4 has now entered code-freeze, so the milestone of this PR has been updated to 27.5.

@crazytonyli
crazytonyli force-pushed the task/wpcom-reauthentication-gate branch from 0187850 to 6dd8b0f Compare October 29, 2026 00:13
@crazytonyli
crazytonyli requested a review from a team as a code owner October 29, 2026 00:13
@AliSoftware

Copy link
Copy Markdown
Contributor

I see we've been added a reviewers on this one, but looking at the diff this branch (and PR stack) clearly needs a clean rebase before even consider merging/reviewing, as its diff includes a lot more things than it is supposed to, like bumps in the Gemfile, bump of .xcode-version, the migration from configure to a8c-secrets that landed a couple of weeks ago, changes in the Fastfile, fixes to Xcode 27's sim diagnostics collection, changes in the app store metadata files, … 🤔

@crazytonyli
crazytonyli force-pushed the task/wpcom-reauthentication-gate branch from 6dd8b0f to c7242d9 Compare October 29, 2026 20:48
@wpmobilebot

wpmobilebot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Build Failure Analysis

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

…sing

The "Log out / Sign In" alert shown after cancelling the web sign-in was
presented on the window's root view controller, so UIKit dropped it whenever
the root was already presenting something, such as the "Your Sites" tip. The
app also never asked for sign-in when the token was missing at launch.

A gate in the window manager's alert-level overlay window now offers only
Sign In and Log out. It appears at launch, on foreground, and when a request
is rejected, stays until the account has a token or is removed, and follows
the scene when the system reconnects it.
@crazytonyli
crazytonyli force-pushed the task/wpcom-reauthentication-gate branch from c7242d9 to a1fa87d Compare October 29, 2026 23:05
@crazytonyli

Copy link
Copy Markdown
Contributor Author

@AliSoftware I think you were notified to review the PR because of the rebase brought in some trunk changes. Sorry for the noise.

@crazytonyli
crazytonyli marked this pull request as draft October 30, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants