[WOOMOB-3799] Propagate and persist custom authentication endpoints (2/3) - #16397
Merged
Conversation
This was referenced Aug 9, 2026
Collaborator
|
|
hichamboushaba
force-pushed
the
issue/WOOMOB-3799-auth-endpoint-plumbing
branch
2 times, most recently
from
August 10, 2026 18:18
1f2a60a to
5d5891e
Compare
hichamboushaba
marked this pull request as ready for review
August 10, 2026 18:35
There was a problem hiding this comment.
AI Code Review - Found 1 potential issue
This is a careful, well-tested refactor of the cookie-nonce authentication flow. Highlights:
- The public
makeAuthenticatedWPAPIRequestsignature change is safe: all callers (CookieNonceWPAPINetwork,WPApiApplicationPasswordsRestClient,JetpackWPAPIRestClient) usenonce.valueand already returnWPAPIResponse<T>, and they now benefit from a non-null nonce (Available). - Backwards compatibility is preserved via the retained
authenticate(siteUrl, ...)overload and the defaultendpointsparam onWPApiSiteRepository.login(...). - Short-circuiting on nonce-acquisition failure (
nonce.toErrorResponse()) correctly produces an error with novolleyError, so it is not misread as a 404 by the outer retry logic. - Endpoint-preservation logic in
SiteWPAPIRestClient(preserve verified/manual admin+login URLs, discard stale inferred ones) is sound and well covered by the new tests.
One minor edge case is flagged inline.
PR housekeeping
- Applied repo
AGENTS.md/CLAUDE.mdguidance (FluxC data-layer conventions, Kotlin style, no wildcard imports). - Test coverage is strong across the changed behavior; no gaps of concern.
Automatic review · claude-opus-4-8 · Workflow run
How to reply to a finding
Reply on this review (or inline at the line the finding refers to) with one of:
@claude addressed- I made the change. Bot verifies against the next diff before marking resolved.@claude rejected: <reason>- Will not fix; reason gets quoted on the next review.@claude not-applicable- Finding does not apply (wrong file, already covered elsewhere, etc.).
The bot honours these on the next review pass.
hichamboushaba
requested review from
AdamGrzybkowski,
JorgeMucientes and
irfano
August 10, 2026 19:06
Base automatically changed from
issue/WOOMOB-3799-cookie-nonce-endpoints
to
trunk
August 14, 2026 09:32
hichamboushaba
force-pushed
the
issue/WOOMOB-3799-auth-endpoint-plumbing
branch
from
August 14, 2026 09:33
64960f6 to
cdd77c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes WOOMOB-3799
Part 2 of 3, stacked on #16396 and followed by #16398.
This is one direct-site-credentials fix split into three PRs for review; the parts are not intended to ship independently. Review this diff against PR1's head. Merge order is 1 → 2 → 3, once the whole stack is approved.
PR1 can verify custom cookie-authentication endpoints, but the app still needs to carry those values through authentication, preserve meaningful failures, and store proven endpoints safely. This PR adds that plumbing without adding user-facing recovery UI.
The changes fall into three areas:
Authentication and nonce refresh
Failure provenance
loginEntryVerifiedsignal from PR1 reaches the app, so a failure after a proven sign-in page is not misreported as an unknown custom login URL.Persistence and refresh
SiteModelcan be reloaded with the normalized values.Review map:
CookieNonceAuthenticator.kt: endpoint-aware initial/refresh nonce flow and failure propagation.SiteWPAPIRestClient.kt: verified endpoint preservation during site refresh.WPApiSiteRepository.kt: endpoint forwarding plus persist-and-reload confirmation.This PR adds no strings or standalone UI. QR login, XML-RPC, and Application Password architecture remain unchanged.
Test Steps
Because custom endpoints cannot be entered until PR3, perform the custom-endpoint steps using the top-of-stack build.
Images/gif
N/A — this PR contains authentication and persistence plumbing only.
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.The stack's single user-facing release note is owned by PR3.