From 92397ef7b362a370608d2cfa9cf93d8ed4868871 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 3 Jun 2024 11:43:52 +0300 Subject: [PATCH 1/3] Replaces OAuth2 section with self-hosted test instructions --- README.md | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 6de18b6906d5..8fc673a822d3 100644 --- a/README.md +++ b/README.md @@ -16,41 +16,8 @@ If you're a developer wanting to contribute, read on. Notes: -* To use WordPress.com features (login to WordPress.com, access Reader and Stats, etc) you need a WordPress.com OAuth2 ID and secret. Please read the [OAuth2 Authentication](#oauth2-authentication) section. * While loading/building the app in Android Studio ignore the prompt to update the gradle plugin version as that will probably introduce build errors. On the other hand, feel free to update if you are planning to work on ensuring the compatibility of the newer version. - -## OAuth2 Authentication ## - -In order to use WordPress.com functions you will need a client ID and -a client secret key. These details will be used to authenticate your -application and verify that the API calls being made are valid. You can -create an application or view details for your existing applications with -our [WordPress.com applications manager][5]. - -When creating your application, you should select "Native client" for the application type. -The "**Website URL**", "**Redirect URLs**", and "**Javascript Origins**" fields are required but not used for -the mobile apps. Just use "**[https://localhost](https://localhost)**". - -Once you've created your application in the [applications manager][5], you'll -need to edit the `./gradle.properties` file and change the -`wp.oauth.app_id` and `wp.oauth.app_secret` fields. Then you can compile and -run the app on a device or an emulator and try to login with a WordPress.com -account. Note that authenticating to WordPress.com via Google is not supported -in development builds of the app, only in the official release. - -Note that credentials created with our [WordPress.com applications manager][5] -allow login only and not signup. New accounts must be created using the [official app][1] -or [on the web](https://wordpress.com/start). Login is restricted to the WordPress.com -account with which the credentials were created. In other words, if the credentials -were created with foo@email.com, you will only be able to login with foo@email.com. -Using another account like bar@email.com will cause the `Client cannot use "password" grant_type` error. - -For security reasons, some account-related actions aren't supported for development -builds when using a WordPress.com account with 2-factor authentication enabled. - -Read more about [OAuth2][6] and the [WordPress.com REST endpoint][7]. - ## Build and Test ## To build, install, and test the project from the command line: @@ -61,6 +28,11 @@ To build, install, and test the project from the command line: $ ./gradlew :WordPress:testWordPressVanillaDebugUnitTest # assemble, install and run unit tests $ ./gradlew :WordPress:connectedWordPressVanillaDebugAndroidTest # assemble, install and run Android tests +## Running the app ## + +You can use your own WordPress site for developing and testing the app. If you don't have one, you can create a temporary test site for free at https://jurassic.ninja/. +On the app start up screen choose "Enter your existing site address" and enter the URL of your site and your credentials. + ## Directory structure ## . ├── libs # dependencies used to build debug variants From 2557cba29d2161ccfd17a63ba18b17bbc0776304 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 3 Jun 2024 13:51:20 +0300 Subject: [PATCH 2/3] Fixes typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fc673a822d3..2965f1d0f61e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ To build, install, and test the project from the command line: ## Running the app ## You can use your own WordPress site for developing and testing the app. If you don't have one, you can create a temporary test site for free at https://jurassic.ninja/. -On the app start up screen choose "Enter your existing site address" and enter the URL of your site and your credentials. +On the app start up screen, choose "Enter your existing site address" and enter the URL of your site and your credentials. ## Directory structure ## . From 01ab55f2407fcebcfca5de416d75de3a9c180cfd Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 3 Jun 2024 13:54:23 +0300 Subject: [PATCH 3/3] Adds note on the wpcom features access limitation --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2965f1d0f61e..abdabaee6db2 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ To build, install, and test the project from the command line: You can use your own WordPress site for developing and testing the app. If you don't have one, you can create a temporary test site for free at https://jurassic.ninja/. On the app start up screen, choose "Enter your existing site address" and enter the URL of your site and your credentials. +Note: Access to WordPress.com features is temporarily disabled in the development environment. + ## Directory structure ## . ├── libs # dependencies used to build debug variants