Ask WPCOM whether custom domain is actually WPCOM
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.
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.