feat: Add WordPress.com OAuth support to iOS and Android demo apps#339
Open
feat: Add WordPress.com OAuth support to iOS and Android demo apps#339
Conversation
5eeb6cc to
0b13e7f
Compare
8681b6b to
6bc5e33
Compare
5d71872 to
e601f8d
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e601f8d to
913043c
Compare
jkmassel
commented
Mar 19, 2026
| kotlinx-coroutines = '1.10.2' | ||
| androidx-recyclerview = '1.3.2' | ||
| wordpress-rs = 'trunk-d02efa6d4d56bc5b44dd2191e837163f9fa27095' | ||
| wordpress-rs = '1190-c2b404d9c9754b229967386fa7460d65fe87a29d' |
Contributor
Author
There was a problem hiding this comment.
This will need to be updated to a trunk revision prior to merging
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.
What?
Add WordPress.com OAuth2 authentication support to both the Android and iOS demo apps, alongside the existing Application Passwords flow for self-hosted sites.
Why?
The demo apps previously only supported self-hosted WordPress sites via Application Passwords. This made testing WordPress.com sites an integration concerns in other apps, which means it's not getting tested as much as it needs to. This PR adds OAuth2 support so the apps can also connect to WordPress.com sites, and upgrades credential storage to use encrypted repositories on both platforms.
How?
Android
DiscoveredAuthenticationMechanismto launch the appropriate auth flow (Application Passwords or OAuth2)Account.WpComso auth type is determined by pattern matchingSharedPreferenceswith encryptedAccountRepositoryfrom wordpress-rs, backed by Android KeystoreSitePreparationViewModeliOS
AuthenticationManagerwith async/throws API supporting both Application Passwords and OAuth2 flowsConfigurationStoragewith encryptedAccountRepositoryfrom wordpress-rs (SecureEnclavePasswordTransformer)WpComDotOrgApiUrlResolverfor correct WP.com API URL routingConfigurationStorageinstead of swallowing themShared (JS/Web)
window.GBKit.editorAssets. (We have the data already, so why download it again?)Testing Instructions
wp_com_oauth_credentials.json.exampletowp_com_oauth_credentials.jsonin the project root, fill in client_id/secret → enter a WP.com site URL → OAuth browser flow → verify editor loads with plugins and theme stylesvanilla.wpmt.co) load the editor and ensure that theme styles are loaded. This validates remote theme style loading.🤖 Generated with Claude Code