Bug 232950

Summary: WebAuthn navigator.credentials.create() fails with "NowAllowedError" after Touch ID interaction
Product: WebKit Reporter: matthew
Component: WebKit Misc.Assignee: pascoe <pascoe>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: garrett_davidson, pascoe, rmondello, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Apple Silicon)   
OS: macOS 12   
Attachments:
Description Flags
Screencast of failing Touch ID registration
none
Screenshot of JS error after Touch ID interaction none

Description matthew 2021-11-10 10:08:00 PST
Created attachment 443827 [details]
Screencast of failing Touch ID registration

WebAuthn platform authenticator registration in macOS 12.0, Safari 15.0, on a new MacBook Pro with an M1 Pro appears to be broken. Triggering `navigator.credentials.create()` on a button click prompts me to allow use of Touch ID as expected, and when I click OK I'm prompted to interact with Touch ID as expected. Tapping my Touch ID sensor, though, shows a "The operation cannot be completed" modal, and a `NotAllowedError` exception is thrown.

I tested this scenario on https://example.simplewebauthn.dev. This exact same code works fine on my 2019 Intel i7 MBP - I am able to register Touch ID as expected.

These are the registration options I passed to `navigator.credentials.create()` (I used my @simplewebauthn/browser library to convert some of these values to buffers as needed before making the actual WebAuthn API request):

```
{
  "challenge": "LHfdXxwvT9lCyG0w0zZ_x6FYNydqnyOsIreqO_ZIIU8",
  "rp": {
    "name": "SimpleWebAuthn Example",
    "id": "example.simplewebauthn.dev"
  },
  "user": {
    "id": "internalUserId",
    "name": "user@example.simplewebauthn.dev",
    "displayName": "user@example.simplewebauthn.dev"
  },
  "pubKeyCredParams": [
    {
      "alg": -7,
      "type": "public-key"
    },
    {
      "alg": -257,
      "type": "public-key"
    }
  ],
  "timeout": 60000,
  "attestation": "direct",
  "excludeCredentials": [],
  "authenticatorSelection": {
    "userVerification": "preferred",
    "requireResidentKey": false
  }
}
```
Comment 1 matthew 2021-11-10 10:08:27 PST
Created attachment 443828 [details]
Screenshot of JS error after Touch ID interaction
Comment 2 Radar WebKit Bug Importer 2021-11-11 08:38:46 PST
<rdar://problem/85300848>
Comment 3 pascoe@apple.com 2021-11-11 09:19:49 PST

*** This bug has been marked as a duplicate of bug 224042 ***