Page MenuHomePhabricator

Allow TOTP auth methods to be named
Closed, ResolvedPublic

Description

Since we plan to support multiple TOTP apps on the same account, we should allow users to give them a name, like we already do for WebAuthn methods.

image.png (372×807 px, 121 KB)

  • On the form for setting up a TOTP app, add a step between "Step 1: Download a 2FA program" and "Step 2: Scan the QR code" for inputting a name
  • Renumber the other steps accordingly
  • Display the name of each TOTP app the user has registered on Special:AccountSecurity

Event Timeline

Catrope triaged this task as Medium priority.Aug 20 2025, 9:02 PM

Would it makes sense to pre-fill this with something generic ("authenticator app") for the user's first TOTP key, to reduce friction? (The names will eventually be editable, right?) Or make it clearly optional?

Would it makes sense to pre-fill this with something generic ("authenticator app") for the user's first TOTP key, to reduce friction? (The names will eventually be editable, right?) Or make it clearly optional?

While I haven't considered the LOE involved in changing that, this sounds like a very sensible idea to me. And we could also just default all the names (e.g. "authenticator app 2") for now. In fact I'm not sure it makes sense to ask the user to enter a value at all, if they won't be able to edit it in the MVP we're rolling out.

We'll probably end up with a bunch of "authenticator app 1" style names anyway, because we need to assign some kind auto-generated name to the keys that have been created in the past.

(The names will eventually be editable, right?)

+1 to the names being editable - otherwise, for anyone that's currently added more than one authenticator app (and can currently remember which is which), they presumably won't be able to give them more descriptive names without removing & re-adding them.
(Also, if someone e.g. changes phone in a way that allows them to transfer the data stored by their authenticator app, a previously-entered name may end up no longer being accurate - e.g., someone might originally name an app "Authy on iPhone 13", which then wouldn't be accurate if they upgraded to an iPhone 15.)

(The names will eventually be editable, right?)

+1 to the names being editable - otherwise, for anyone that's currently added more than one authenticator app (and can currently remember which is which), they presumably won't be able to give them more descriptive names without removing & re-adding them.
(Also, if someone e.g. changes phone in a way that allows them to transfer the data stored by their authenticator app, a previously-entered name may end up no longer being accurate - e.g., someone might originally name an app "Authy on iPhone 13", which then wouldn't be accurate if they upgraded to an iPhone 15.)

T401775 addresses this but there are other tickets ahead of this work

Change #1198606 had a related patch set uploaded (by Mstyles; author: Mstyles):

[mediawiki/extensions/OATHAuth@master] Allow TOTP auth methods to be named

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

Change #1198606 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Allow TOTP auth methods to be named

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

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

[mediawiki/extensions/OATHAuth@REL1_45] Allow TOTP auth methods to be named

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

Change #1199867 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@REL1_45] Allow TOTP auth methods to be named

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