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

Introduce an Authenticate action for self-hosted sites

Open hypest opened this issue 8 years ago • 0 comments

Currently, there is no separate authentication step for self-hosted sites and the logging in process is performed with the SiteAction.FETCH_SITES_XML_RPC action. When authentication is failing with that call, both an onAuthenticationChanged and an onSiteChanged event are emitted. The actual error message is in the onAuthenticationChanged data though and onSiteChangeds message needs just be discarded (ERROR_GENERIC).

That's a bit messy to handle and doesn't play too well with the new login process (still WIP at the time of writing) where, following WPCOM's case, the authentication is happening on a different screen than the site listing/fetching.

It would be nice if the FluxC user could rely on a single onAuthenticationChanged response both for success and for failure and then issue a subsequent "list/fetch sites" action.

hypest avatar Jun 15 '17 12:06 hypest