Bug 250589

Summary: [WebAuthn] Conditional passkey request presents conditional control even after AbortController.abort()
Product: WebKit Reporter: Jonathan Hurshman <jhurshman>
Component: FormsAssignee: pascoe <pascoe>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, mathieu.perreault, matthew, pascoe, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   

Description Jonathan Hurshman 2023-01-13 11:57:19 PST
Steps to reproduce:
1. Set up an AbortController
2. <input autocomplete="username webauthn"> and a button whose click handler will call the abortController.abort(), hide the username, and show a password control.
3. Perform webauthn get with conditional mediation:
navigator.credentials.get({
  signal: abortController.signal,
  mediation: 'conditional',
  publicKey: {
    challenge: <challengeFromServer>,
  },
  allowCredentials: []
});
3. Click the input, conditional UI appears.
4. Click the abort control.
6. Set focus to the password field.
7. Conditional UI appears again. (If user attempts to use the passkey, console shows error "AbortError: Aborted by AbortSignal".)

Expected behavior:
In step 7, no conditional UI should be displayed, since the get has been aborted.
Comment 1 Radar WebKit Bug Importer 2023-01-20 11:58:13 PST
<rdar://problem/104485543>
Comment 2 pascoe@apple.com 2023-02-01 06:50:41 PST
Pull request: https://github.com/WebKit/WebKit/pull/9449
Comment 3 EWS 2023-02-02 08:19:30 PST
Committed 259754@main (ba76ae810b9d): <https://commits.webkit.org/259754@main>

Reviewed commits have been landed. Closing PR #9449 and removing active labels.
Comment 4 pascoe@apple.com 2023-02-07 14:59:50 PST
*** Bug 251817 has been marked as a duplicate of this bug. ***
Comment 5 Mathieu Perreault 2023-02-14 07:10:51 PST
Very happy to see this issue being fixed! Could someone advise on which Safari/iOS version we could see this commit in (Beta, etc.)?
Comment 6 matthew 2023-02-22 19:47:34 PST
Release notes for Safari Technology Preview 164 mention that the fix for this issue is included in the release! 🎉

https://developer.apple.com/safari/technology-preview/release-notes/