Page MenuHomePhabricator

MediaWiki should support passwordless login with passkeys
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

Passkeys (also known as multi-device FIDO credentials) should be offered as a first resort instead of passwords (and accompanying multi-factor authentication schemes), and accounts with passwords should be capable of transitioning to use passkeys exclusively.

Passkeys are currently supported as a multi-factor authentication method through Extension:WebAuthn.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Any authentication flow that includes a password should instead favor passkeys as a first resort: if an account has both, it should ask for a passkey by default. New accounts should be encouraged to avoid creating passwords in the first place in favor of passkeys.

Multi-factor authentication systems, if present, should only be used alongside passwords: passkeys are phishing-resistant due their design, so TOTP codes and similar systems are redundant.

Benefits (why should this be implemented?):

Passwords are notoriously insecure, and systems like TOTP are still vulnerable to phishing attacks while adding considerable complexity to login flows. Major websites like Wikipedia have yet to implement multi-factor at large, still relying on passwords as the first and last line of defense. I feel it would be valuable for MediaWiki to set a good example for the Internet ecosystem as a whole by adopting passkeys as soon as possible.

Passkeys don't rely on a shared secret of any kind, which massively improves the security of servers: they are much easier to implement than other authentication schemes as a result.

Numerous projects use MediaWiki, and all of them would gain considerable security benefits and a better user experience from adopting passkeys. All major OS and browser vendors have committed to their support, and they are already implemented in macOS and iOS. By the time MediaWiki finishes implementing it, it is likely to be supported on the other major platforms as well.

Implementation:
I (TheDJ) was trying to find how the UX flow should work for a login screen when you have:

  1. Users with passwords
  2. Users with passkey known to the system (say Apple's touchID+keychain)
  3. Users with hardware passkey (say a Yubico key)
  4. Users with 2FA

And I found this explainer, which I think is pretty helpful if anyone ever wanted to work on this.
https://github.com/w3c/webauthn/wiki/Explainer:-WebAuthn-Conditional-UI

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

OK, I've tested WebAuthn 2FA with Wikipedia, and found an unusual issue: I can successfully create and use a passkey on macOS 13.0 and Safari 16.1. However, when attempting to use it to login on iOS 16.1 and Safari 16.1, Wikipedia's login flow doesn't seem to prompt for a passkey at all.

Instead, it simply says "Please touch your verification device or follow the instructions from the browser". It has a single button, "Continue login", which causes the verification process to fail when pressed. My iPhone definitely has the WebAuthn/passkey credential I registered on my Mac: it just isn't getting asked for it like the latter is.

Is it possible that there is some sort of mobile-specific bug with the WebAuthn implementation?

The mobile bug seems to be T286138.

Just to confirm, Passkey as 2FA works fine on desktop right?

Just to confirm, Passkey as 2FA works fine on desktop right?

It did in October, yes.

I switched my account to TOTP upon encountering the issue. Let me know if you want me to switch it back temporarily to see if it still works.

As far as I know, all versions of Safari share the same functional implementation. My best guess is that MediaWiki is violating the specification somewhere, and it only works on macOS due to undefined behavior.

Just to confirm, Passkey as 2FA works fine on desktop right?

It did in October, yes.

I switched my account to TOTP upon encountering the issue. Let me know if you want me to switch it back temporarily to see if it still works.

As far as I know, all versions of Safari share the same functional implementation. My best guess is that MediaWiki is violating the specification somewhere, and it only works on macOS due to undefined behavior.

The mobile bug should be fixed with T286138, and it'll be deployed on WMF wiki early next year.

alistair3149 renamed this task from MediaWiki should support passkeys to MediaWiki should support passwordless login with passkeys.Jun 13 2023, 2:53 AM
alistair3149 updated the task description. (Show Details)

Passkeys are origin-bound so this is blocked on T244088: Logging in at another wiki than WebAuth was set up fails.

Passkeys as a second factor are a clear security improvement over TOTP (which is not origin-bound, so phishable) and a usability improvement over U2F as you don't need an extra piece of hardware. Passwords as primary authentication, not so sure. Easy to get yourself locked out when you lose your phone (for 2FA we'd do a human review and remove the second factor; for lost primary credentials, what would we do?), passkeys are device-bound so you'd need some sort of cross-device attestation process, and you essentially transfer security to the device managing the passkey (phones with fingerprint sensors are probably OK; but e.g. Windows Hello uses a 6-digit PIN which is hardly safer than a password).

Is the major blocker of this feature solved by the deployment of T348388: SUL3: Use a dedicated domain for login and account creation? If so, can we push this forward?

Is the major blocker of this feature solved by the deployment of T348388: SUL3: Use a dedicated domain for login and account creation?

Yes, although there are plenty of minor blockers due to the WebAuthn just not working very well in general.

If so, can we push this forward?

Someone needs to decide first whether we want to push forward at all. Arguably the technology is not that mature yet (see e.g. https://arstechnica.com/security/2024/12/passkey-technology-is-elegant-but-its-most-definitely-not-usable-security/ or this recent vulnerability) and used on few other large websites.

Chrome and Safari now support automatic creation of passwordless login after a successful password login:

Regarding recovery, perhaps to go fully passwordless users could be required to either have at least 2 passkeys OR one synced passkey (if we can detect this). If a user only has 1 local-bound passkey it should still bypass password but login via password + 2fa could still be possible to prevent lockout.
Alternatively passwordless with only 1 passkey regardless of type could be allowed BUT users then would be required to verify saving recovery codes by using one upon creation of their first passkey to ensure a recovery method.

Regarding the line

Someone needs to decide first whether we want to push forward at all. Arguably the technology is not that mature yet (see e.g. https://arstechnica.com/security/2024/12/passkey-technology-is-elegant-but-its-most-definitely-not-usable-security/ or this recent vulnerability) and used on few other large websites.

That number has increased as according to findings from the FIDO Alliance, 48% of the world’s top 100 websites
have already integrated passkey support. (https://fidoalliance.org/wp-content/uploads/2025/04/World-Password-Day-2025-Final.pdf)
We can also see that many companies are actively working to increase passkey adoption and usage including amazon, Microsoft and google: https://fidoalliance.org/passkeypledge/#See-Who-Has-Signed-the-Pledge

Additionally, Microsoft has made accounts passwordless by default: https://www.microsoft.com/en-us/security/blog/2025/05/01/pushing-passkeys-forward-microsofts-latest-updates-for-simpler-safer-sign-ins/
Due to this extreme overall push, there is a very strong argument to be made for passwordless support via passkeys.

At the MediaWiki Users and Developers Conference in Fall 2025, I introduced a prototype extension for passkey support (https://www.mediawiki.org/wiki/Extension:PasskeyAuth). Hopefully, this will provide a framework for future passkey authentication in MediaWiki. We will also see if this can soon be productionized as an extension that is based on PluggableAuth.

I am fully aware that this prototype is likely not appropriate for the needs of the WMF, but I at least hope this can serve as a demonstration of the possibilities with regard to this subject matter.

Change #1233318 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/extensions/OATHAuth@master] [Proof of concept] Passwordless login

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

Change #1233319 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/extensions/WebAuthn@master] [Proof of concept] Passwordless login

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

Change #1233319 abandoned by Reedy:

[mediawiki/extensions/WebAuthn@master] [Proof of concept] Passwordless login

Reason:

Squashed into https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OATHAuth/+/1233318 (incoming)

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

Change #1236403 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/extensions/OATHAuth@master] Add a database table to track WebAuthn userHandle values

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

Change #1236403 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Add a database table to track WebAuthn userHandle values

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

Super happy to see production-ready passkey support coming soon. If it is added into OATHAuth, I will deprecate PasskeyAuth and recommend to use OATHAuth.

Hello, how should I word this for Tech News? @Saklad5

@STei-WMF Reach out to us on Slack to work it out. We'll need to be precise about it, because...

For the various interested parties on this ticket, I do want to make sure it's clear the steps we're taking now, and what we're not taking (yet).

  • The big limitation is that this is still only going to be usable for accounts which have already set up 2FA (which means having first set up either an authenticator app or security key). Passwordless login will not work for regular user accounts that currently login only using a password.
  • The main reasons for this right now are 1) we're concerned about 2FA-required users registering _only_ a passkey to their account, especially a device-tied non-synced passkey, and then losing access to that device, and 2) the current motivation for our wave of 2FA/passkey work over the last year is to support users for whom 2FA is required (a user group which is going to increase a lot, soon). Until we get through this effort, we are laser-focused on increasing usability and lowering lockout risk for that group of users.
  • Passwordless login will be supported if the account has a UV-supporting passkey registered to it. UV-supporting means that it requires user verification (a PIN or biometric) at the time of login, not just a button press or mouse click. Generally, we're only allowing passkeys to be registered in the first place if they advertise requirements for UV, though we recently relaxed this for Firefox on Linux clients given the behavior we see with 3rd-party password managers on that platform.
  • Some sites may be more relaxed about requiring UV for passwordless login even when 2FA would otherwise be required (I think this is true for GitHub, for example). A site that does this is basically saying that one-factor login is fine for "2FA"-enabled accounts, as long as that one factor is phishing-resistant. There may well be an argument for that, but we're not ready to go down that road right now.

The throughline here is that we are taking passkey implementation one step at a time, seeing what passkey providers users choose and what those providers' behavior is, and making sure it's working well, before taking bigger steps or expanding to larger audiences.

We do plan to aggressively let 2FA-enabled users know about the ability to add passkeys to their account and smooth their login experience, once we have passwordless login deployed. In the near-term, it may be that 2FA-required users are those who have the smoothest login experience on the wikis -- which would be quite a role reversal.

Please keep filing bugs and let us know how our system is working out in practice, so that we can smooth out the experience, and plan out where we take it next.

Change #1245437 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/extensions/OATHAuth@master] WebAuthnAuthenticator: Allow multiple challenges in parallel

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

Change #1245437 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] WebAuthnAuthenticator: Allow multiple challenges in parallel

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

Change #1233318 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Add passwordless login with passkeys

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