Bug 240666 - WebAuthn API Promises Do Not Resolve in WKWebView
Summary: WebAuthn API Promises Do Not Resolve in WKWebView
Status: RESOLVED DUPLICATE of bug 237380
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-19 10:14 PDT by Kevin Flanagan
Modified: 2022-05-19 10:57 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Flanagan 2022-05-19 10:14:02 PDT
Overview

To my understanding WebAuthn is not supported by WKWebView. However, when accessing APIs related to WebAuthn in an iOS WKWebView promises returned by those functions never resolve. Specifically this behavior can be seen at least with `window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()` and `navigator.credentials.create()`.

Steps to Reproduce:
1. Open an app with a WBWebView on an iOS device (this does not reproduce with iOS simulator to my knowledge)
2. Load a site that uses one of these functions, or invoke from the console of the web inspector (isUserVerifyingPlatformAuthenticatorAvailable() is the easier function to use)
    - https://demo.yubico.com/webauthn-technical/registration shows this behavior
3. Observe that a promise is returned by the promise is never resolved or rejected

Actual Results:
A promise is returned that is never resolved or rejected

Expected Results:
I would expect that these promises either return with false (in the isUserVerifyingPlatformAuthenticatorAvailable case) or are rejected for not being supported in WKWebView.
Comment 1 pascoe@apple.com 2022-05-19 10:57:08 PDT

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