Page MenuHomePhabricator

[Android] Add support for selectable TOTP module when logging in with MFA.
Closed, ResolvedPublic

Description

As part of WE4.6.2, functionality is being added to allow users to enable multiple authentication factors, which includes WebAuthn and TOTP. When we log in through the API, and the user has multiple authenticators enabled, the login response will become slightly different, and will allow us to "select" the factor to be used. (Since we don't yet support WebAuthn, we will need to explicitly select TOTP.)

The logic for working with the new selection logic is laid out in this task.

(At the moment, there is some fallback compatibility logic that makes the API work as before with existing clients, but this will be removed once these tasks are complete and rolled out.)

Event Timeline

ABorbaWMF subscribed.

Fixed on 2.7.50550-r-2025-09-22

Tested on Pixel 6 on Android 15 and OnePlus 8 on Android 13. Tested with 2FA and without.

Change #1191740 had a related patch set uploaded (by Dbrant; author: Dbrant):

[mediawiki/extensions/OATHAuth@master] [WIP] Remove backward compatibility for Apps' login flow.

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

Test wiki created on Patch demo by Dmitry Brant using patch(es) linked to this task:
https://d22139cba6.catalyst.wmcloud.org/w/

hi @Dbrant - the patch was uploaded after @ABorbaWMF tested. Do we need to re-test?

hi @Dbrant - the patch was uploaded after @ABorbaWMF tested. Do we need to re-test?

Whoops, I repurposed this task for completing our side of supporting MFA. The previous test by Anthony was merely to test if logins are working correctly since they made a server-side hack to exclude apps from MFA. The next step will be to remove the exclusion, and test again if everything works. (this is currently pending iOS finishing their integration.)

Just FYI, the work from FY2025-26 WE4.6.2 Multiple Authenticators should now be available on the beta cluster to test as well.