Page MenuHomePhabricator

Cannot use NFC security keys with WebAuthn on iOS
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Register a YubiKey with FIDO U2F support via USB on a desktop browser on en.wikipedia.org
  • Try to log in with the key in Mobile Safari or the Wikipedia app on an iPhone with NFC

What happens?:
The mobile site says verification failed, while the desktop site says authentication was interrupted. The iOS app just says "Please touch your verification device ..." but doesn't recognize it either. The iOS native NFC / security key UI never shows up.

What should have happened instead?:
It should have recognized my security key via NFC.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
English Wikipedia, iPhone X, iOS 15.0, Mobile Safari / Wikipedia 6.8.1 (1815), YubiKey Security Key NFC

Event Timeline

Alexiaa updated the task description. (Show Details)
Alexiaa renamed this task from Cannot use NFC security keys with WebAuthn in Mobile Safari or Wikipedia app on iOS to Cannot use NFC security keys with WebAuthn on iOS.Jul 4 2021, 9:11 AM
Alexiaa updated the task description. (Show Details)
Alexiaa updated the task description. (Show Details)

Reproduced on Mobile view:

IMG_3770.PNG (1,124×2,309 px, 253 KB)
IMG_3771.PNG (1,124×2,316 px, 235 KB)

But it works fine when using desktop view.
iOS 15.7, YubiKey 5 NFC

I have a working theory that WebAuthn does not work on MobileFrontend because the ResourceLoader module is not loaded at all.
WebAuthn requires Javascript to complete the verification process.

I am unable to verify it on WMF production since I don't have OATH access, but I have done a similar experiment on a non-WMF wiki by logging into an account with WebAuthn enabled and Javascript disabled. It yields the same result as above. I will verify once again when I have OATH permission on WMF production.

If that is the case, it is a relatively easy fix. Just need a few lines in extension.json to make sure it loads on MobileFrontend:

"targets": [
	"desktop",
	"mobile"
]

Change 868177 had a related patch set uploaded (by Alistair3149; author: Alistair3149):

[mediawiki/extensions/WebAuthn@master] Load WebAuthn RL modules on mobile

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

Change 868177 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@master] Load WebAuthn RL modules on mobile

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

Change 868057 had a related patch set uploaded (by Reedy; author: Alistair3149):

[mediawiki/extensions/WebAuthn@REL1_39] Load WebAuthn RL modules on mobile

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

Change 868058 had a related patch set uploaded (by Reedy; author: Alistair3149):

[mediawiki/extensions/WebAuthn@REL1_38] Load WebAuthn RL modules on mobile

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

Change 868059 had a related patch set uploaded (by Reedy; author: Alistair3149):

[mediawiki/extensions/WebAuthn@REL1_35] Load WebAuthn RL modules on mobile

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

Change 868058 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@REL1_38] Load WebAuthn RL modules on mobile

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

Change 868057 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@REL1_39] Load WebAuthn RL modules on mobile

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

Change 868059 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@REL1_35] Load WebAuthn RL modules on mobile

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

alistair3149 claimed this task.