wordpress-mobile / WordPress-Login-Flow-Android

Pluggable WordPress login flow for Android
GNU General Public License v2.0
14 stars 3 forks source link

Skip xmlrpc discovery when jetpack ready #68

Closed malinajirka closed 2 years ago

malinajirka commented 2 years ago

This PR builds on top of https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/67. When a site responds with "jetpack connected and active" the app knows that Jetpack connection is working without issues and it can skip the xml-rpc check. This should fix an issue discovered by @designsimply

https://wordpress.org/plugins/disable-xml-rpc-api/
When I tried to use the store address > site credentials flow to log in while this plugin is enabled, the error incorrectly tells me that the site at my address is not a valid WordPress site.

To test in WCAndroid:

  1. Install "disable-xml-rpc-api plugin
  2. Go into its settings and make sure Jetpack is whitelisted
  3. Open "Site address" login flow
  4. Enter url of the site
  5. Make sure it redirects you to the ".com" login and does NOT display "Not a wordpress site" error
malinajirka commented 2 years ago

Thanks so much for the review @shiki and also for testing extra scenarios to make sure the login flow works as expected!! I wasn't able to reproduce the issues, let me know if you have any tips on how to reproduce them. Thanks!