WordPress-FluxC-Android icon indicating copy to clipboard operation
WordPress-FluxC-Android copied to clipboard

Ask WPCOM whether custom domain is actually WPCOM

Open hypest opened this issue 8 years ago • 1 comments

As part of the login discovery process, it would be useful to add a check for whether the site behind a custom domain is hosted on wordpress.com and identify it as a WPCOM site.

Currently, a site with a custom domain and 2FA enabled cannot login the app as 2FA is not supported via XMLRPC but at the same time, the site is not identified as WPCOM in order to switch to the WPCOM REST API.

hypest avatar Jun 16 '17 13:06 hypest

I think it's better to do this a separate pre-discovery check in the client app, rather than add WP.com REST calls to what's supposed to be a self-hosted (XML-RPC or WP-API) process.

That is, calling FETCH_CONNECT_SITE_INFO from the client app, and deciding after that whether a call to DISCOVER_ENDPOINT is necessary.

aforcier avatar Jun 16 '17 13:06 aforcier