Page MenuHomePhabricator

Passkey section on Special:AccountSecurity moves around unexpectedly
Open, Needs TriagePublic

Description

When testing the new passkey functionality on http://en.wikipedia.beta.wmflabs.org/wiki/Special:AccountSecurity:

Before I enable 2FA, the section to add a passkey appears below the 2FA section:

passkey section before 2fa.png (2,016×1,777 px, 150 KB)

After I enable 2FA, the passkey section moves up and appears in a different place on the page:

passkey section after 2fa.png (2,016×1,777 px, 172 KB)

I suspect this is an intentional design choice, because users can't enable passkeys until after they have added a 2FA method. However, this behavior and UI inconsistency is unexpected to me as a user; I would expect to find these page elements in the same place on the page. When I went back to Special:AccountSecurity after adding a 2FA method, I was surprised that the Passkey section was in a dfiferent place.

Suggestion: put the passkey section between the password and 2FA sections permanently. The UI text explaining that you must enable 2FA before you can add a passkey is sufficiently clear.

Event Timeline

rEOATa2b71beb8a15: Vue version of Special:OATHManage did this explicitly:

		$output->addHTML( Html::rawElement( 'div', [ 'class' => 'mw-special-OATHManage-vue-container' ],
			// If 2FA is enabled, then put passkeys first, otherwise put 2FA first
			$keyAccordions === '' ?
				$authMethodsSection . $passkeySection :
				$passkeySection . $authMethodsSection
		) );

Change #1283829 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/OATHAuth@master] WIP: OATHManage: Don't move passkeys section around

https://gerrit.wikimedia.org/r/1283829

The other is that OATHManage.vue also moves the passkey section around... The WIP change above results in a visible re-order, which is somewhat funny to watch.

I think the passkey section will be listed first if you have them enabled too.

So that's at least 3 different places it can end up?

We do have the To add a passkey you must first set up two-factor authentication. message, so even if it's not useable in all cases, it should be clear why.

If we decide the purposeful order, we need to further change the OATHManage file, and then update OATHManage.vue to match!