docs: reinstate WordPress.com OAuth2 setup for contributors - #23288
Open
dcalhoun wants to merge 3 commits into
Open
docs: reinstate WordPress.com OAuth2 setup for contributors#23288dcalhoun wants to merge 3 commits into
dcalhoun wants to merge 3 commits into
Conversation
Values in a Git-ignored `secrets.properties` at the root of the repository now take precedence over `defaults.properties`, as well as over any secrets applied by `configure_apply`. Keys the file leaves out keep their existing value, so it only needs the entries being overridden. This gives contributors a place to put their own WordPress.com OAuth2 credentials that isn't a tracked file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HSP5MJmVBoiqtwBhaa4eHo
The instructions were removed in #20928 because passkey-related API changes had broken the WordPress.com authentication flow. The rebuilt web-based login works again, so document the setup in `docs/wpcom-authentication.md`: registering an application, adding both `wordpress://wpcom-authorize` and `jetpack://wpcom-authorize` as redirect URLs, and supplying the credentials via `secrets.properties`. Registering both redirect URLs is the step the previous instructions did not cover, since the flow now returns to the app through a URL scheme that differs per app and WordPress.com matches the redirect exactly. Also drops the note claiming WordPress.com access is disabled in development. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HSP5MJmVBoiqtwBhaa4eHo
Only `[1]` and `[8]` are referenced, both from the Google Configuration section. The rest are leftovers: `[5]`, `[6]` and `[7]` belonged to the OAuth2 section removed in #20928, and the body links to Android Studio and the WordPress Slack inline rather than through `[3]` and `[4]`. Link reference definitions render as nothing, so this does not change the page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HSP5MJmVBoiqtwBhaa4eHo
Contributor
|
|
Contributor
|
|
dcalhoun
marked this pull request as ready for review
September 3, 2026 13:20
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
WordPress.com OAuth2 documentation was removed in #20928 because passkey-related API changes had broken the authentication flow for anyone building without our secrets. Now that login is rebuilt on a web-based authorization flow, external contributors can register their own WordPress.com application and sign in again, so this reinstates the documentation — and adds the Git-ignored configuration file it needs.
Three commits:
build:settings.gradlenow layers a Git-ignoredsecrets.propertiesat the root of the repository over whichever base applies, so values there take precedence overdefaults.propertiesand over any secrets applied byconfigure_apply. Keys the file leaves out keep their existing value, so it only needs the entries being overridden. Previously the only place to changewp.oauth.app_idwasdefaults.properties, a tracked file — an easy way for a contributor to commit their client secret by accident.secrets.properties-exampleis the copy target and.gitignorecovers the copy.docs:docs/wpcom-authentication.mddocuments the setup, with pointers from the README and the docs index. The step the old instructions did not cover is registering bothwordpress://wpcom-authorizeandjetpack://wpcom-authorizeas Redirect URLs: the flow now returns to the app through a URL scheme that differs per app, and WordPress.com only redirects to an exact match. This also drops the README's "Access to WordPress.com features is temporarily disabled in the development environment" note, which is no longer true.docs:removes five link reference definitions in the README that nothing points at.[5],[6]and[7]belonged to the OAuth2 section Replaces OAuth2 section with self-hosted test instructions #20928 removed; the body links to Android Studio and the WordPress Slack inline rather than through[3]and[4]. Link reference definitions render as nothing, so the page is unchanged.The Gradle change is the part worth the closest look, since it alters secret precedence for everyone rather than only for contributors.
Internal context: p1784211249505409-slack-C04PWEZSYFL
Testing instructions
Verify the override reaches
BuildConfig(no WordPress.com application needed):secrets.propertiesin the root of the repository containingwp.oauth.app_id = test_client_id_12345../gradlew :WordPress:generateJetpackDebugBuildConfig.Applying local secret overrides from secrets.properties.OAUTH_APP_IDinWordPress/build/generated/source/buildConfig/jetpack/debug/org/wordpress/android/BuildConfig.javaistest_client_id_12345, even with our secrets applied.secrets.propertiesand run the task again.OAUTH_APP_IDis back to its usual value, and thatgit statusnever listedsecrets.properties.Verify the documented setup end to end, ideally with our secrets disabled so you are on the contributor path:
docs/wpcom-authentication.mdwith a WordPress.com application of your own, registering both redirect URLs.jetpackDebug, then choose "Log in or sign up with WordPress.com".wordpressDebug.Read the rendered README and docs index.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HSP5MJmVBoiqtwBhaa4eHo