Page MenuHomePhabricator

During login, allow multiple 2FA methods to be used, but prioritize WebAuthn if available
Closed, ResolvedPublic

Description

When a user who has 2FA enabled, we should allow them to use any 2FA method they have set up, but we should offer WebAuthn first, TOTP second, and recovery codes third.

image.png (881×433 px, 98 KB)
image.png (881×433 px, 94 KB)
image.png (826×400 px, 89 KB)
image.png (880×409 px, 84 KB)
WebAuthn onlyTOTP onlyWebAuthn + TOTPRecovery code form
  • If the user only has WebAuthn, continue with WebAuthn by default, but display a button that leads to a form where they can input a recovery code
  • If the user only has TOTP, display a form where they can enter a TOTP code, but display a button that leads to a form where they can input a recovery code
  • If the user has both WebAuthn and TOTP, continue with WebAuthn by default, but display a button that leads to a TOTP form, and a button that leads to a recovery code form
  • The recovery code form should have a button linking back to the WebAuthn flow or the TOTP flow (or both if both are available)

Event Timeline

@AAlhazwani-WMF I was a bit bold and used my preferred design alternative here instead of the MenuButton-based one you have in your current designs, but I'd be happy to update this task with whatever we settle on.

@AAlhazwani-WMF I was a bit bold and used my preferred design alternative here instead of the MenuButton-based one you have in your current designs, but I'd be happy to update this task with whatever we settle on.

@Catrope WP:BB is more than welcome. as i shared on figma (link to comment) i don't have a strong opinion about this, and agreed with your proposal.

Catrope triaged this task as High priority.

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

[mediawiki/extensions/OATHAuth@master] Multiple 2FA methods for login

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

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

[mediawiki/core@master] Pass flags and weight from OATHAuth

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

Change #1182980 abandoned by Mstyles:

[mediawiki/core@master] Pass flags and weight from OATHAuth

Reason:

Need to make changes inside OATHAuth

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

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

[mediawiki/extensions/OATHAuth@master] Add getPriority to iModule interface

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

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

[mediawiki/extensions/WebAuthn@master] Set default priority for WebAuthn

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

Change #1184201 abandoned by Mstyles:

[mediawiki/extensions/WebAuthn@master] Set default priority for WebAuthn

Reason:

planning to store in config

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

Change #1182979 abandoned by Mstyles:

[mediawiki/extensions/OATHAuth@master] Multiple 2FA methods for login

Reason:

starting fresh

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

Change #1184200 abandoned by Mstyles:

[mediawiki/extensions/OATHAuth@master] Add getPriority to iModule interface

Reason:

planning to use config variable

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

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

[mediawiki/extensions/OATHAuth@master] Multiple 2FA methods for login

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

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

[mediawiki/extensions/WebAuthn@master] Add "GetButtonDisplayMessage" message

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

Change #1187237 abandoned by Mstyles:

[mediawiki/extensions/WebAuthn@master] Add "GetButtonDisplayMessage" message

Reason:

duplicate

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

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

[mediawiki/extensions/WebAuthn@master] Add "GetButtonDisplayMessage" message

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

Change #1188485 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@master] Add login switch button message

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

Change #1186136 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Replace 2FA method switch dropdown with buttons

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

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

[mediawiki/extensions/OATHAuth@master] Prefer WebAuthn

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

Change #1188920 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Prefer WebAuthn and set priority order

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