Wordpress-ios: Autofill login: Should the autofill prompt appear when adding self-hosted sites to the app?

Created on 26 Mar 2016  Â·  5Comments  Â·  Source: wordpress-mobile/WordPress-iOS

The autofill prompt only works for passwords saved for WordPress.com (not subdomains of wordpress.com, mapped domains, or self-hosted sites). However, when I add a new self-hosted site to the app, I get the autofill prompt. Should the prompt be appearing there at all?

Expected behavior

I expect the autofill prompt to only appear when I am trying to log in to WordPress.com.

Actual behavior

When I add a self-hosted site to the app, the prompt appears on the self-hosted login screen. If I select WordPress.com credentials at that point, it switches me to the WordPress login screen and fills in my credentials. (This is confusing — at first it made me think that I _should_ be able to autofill my credentials for a self-hosted site, because the prompt appeared there.)

Steps to reproduce the behavior

  1. While logged out of WordPress.com and logged in to at least one self-hosted site, go to My Sites > Switch Site > + (in the top right)
  2. Select Add self-hosted site. Result: The autofill prompt appears on the self-hosted login screen, even though I can't autofill any self-hosted credentials there.
  3. If I select a WordPress.com account from the prompt, I am switched to the WordPress.com login screen (potentially useful if I have a WordPress.com account to log in to, but confusing since that isn't what I was trying to do).

I can also get the prompt to appear when I'm not logged in to any sites in the app, with these steps:

  1. Open the WordPress app. On the WordPress.com login screen, when the prompt appears, select "Not Now."
  2. Select "Add self-hosted site"
  3. Leave the WordPress app (e.g. to switch to a password manager app)
  4. Return to the WordPress app. Result: The autofill prompt appears even though I'm still on the self-hosted login screen.
  5. Again, if I select a WordPress.com account from the prompt, I am switched to the WordPress.com login screen.
Tested on iPhone 6, iOS 9.3, app beta v. 6.1.0.20160318
NUX [Type] Bug

All 5 comments

I'm changing this issue from a Question to a Bug, because of this:

  1. While logged in to a WordPress.com account, go to My Sites > Switch Site > + (in the top right)
  2. Select Add self-hosted site. (Note that the autofill prompt appears.)
  3. Select a different WordPress.com account from the prompt (not the account you are logged in to) and tap OK.

Result: All of the second WordPress.com account's sites are added to the app, but the Me tab only shows you as logged in to the first WordPress.com account.

Going to Me > Disconnect from WordPress.com only logs you out of the first WordPress.com account. If you don't have any self-hosted sites in the app, you are taken out of the app (to the login screen), but if you log in again the second WordPress.com account's sites are still there. Those sites have to be removed like self-hosted sites (Settings > Remove Site) but can't be accessed if you log out of the app on the Me tab.

This behavior should be resolved in v6.2 with the sign-in refactor to support magic links, however, its still an issue in 6.1. We should probably patch it, especially since we'll most likely A/B test the sign in refactor.
@kurzee I'm happy to add this to my plate unless you want to wrangle it.

@aerych already working on it 😎

A fix is ready for not showing the prompt https://github.com/wordpress-mobile/WordPress-iOS/pull/5038.

I think we have a separate issue here in that it seems if a user _were_ able to login to multiple .com accounts it breaks the authenticated account relationships. Perhaps there should be some cleanup code in the event of a secondary login? (Separate issue)

Was this page helpful?
0 / 5 - 0 ratings