Title: [264490] trunk
Revision
264490
Author
[email protected]
Date
2020-07-16 18:07:27 -0700 (Thu, 16 Jul 2020)

Log Message

[WebAuthn] Add a console message: "User gesture is required to use the platform authenticator."
https://bugs.webkit.org/show_bug.cgi?id=214380
<rdar://problem/65300587>

Reviewed by Devin Rousso.

Source/WebKit:

Covered by existing tests.

* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):

LayoutTests:

* http/wpt/credential-management/credentialscontainer-store-basics.https-expected.txt:
* http/wpt/webauthn/ctap-hid-failure.https-expected.txt:
* http/wpt/webauthn/ctap-hid-success.https-expected.txt:
* http/wpt/webauthn/ctap-nfc-failure.https-expected.txt:
* http/wpt/webauthn/idl.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (264489 => 264490)


--- trunk/LayoutTests/ChangeLog	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/ChangeLog	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,41 @@
+2020-07-16  Jiewen Tan  <[email protected]>
+
+        [WebAuthn] Add a console message: "User gesture is required to use the platform authenticator."
+        https://bugs.webkit.org/show_bug.cgi?id=214380
+        <rdar://problem/65300587>
+
+        Reviewed by Devin Rousso.
+
+        * http/wpt/credential-management/credentialscontainer-store-basics.https-expected.txt:
+        * http/wpt/webauthn/ctap-hid-failure.https-expected.txt:
+        * http/wpt/webauthn/ctap-hid-success.https-expected.txt:
+        * http/wpt/webauthn/ctap-nfc-failure.https-expected.txt:
+        * http/wpt/webauthn/idl.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt:
+        * http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt:
+
 2020-07-16  Hector Lopez  <[email protected]>
 
         [ macOS iOS ] imported/mozilla/svg/linearGradient-basic-03.svg is passing and expectations need to be removed

Modified: trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-store-basics.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-store-basics.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-store-basics.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS navigator.credentials.store(). 
 

Modified: trunk/LayoutTests/http/wpt/webauthn/ctap-hid-failure.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/ctap-hid-failure.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/ctap-hid-failure.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,11 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS CTAP HID with init sub stage data not sent error in a mock hid authenticator. 
 PASS CTAP HID with init sub stage empty report error in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/ctap-hid-success.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/ctap-hid-success.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/ctap-hid-success.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,8 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS CTAP HID with keep alive message in a mock hid authenticator. 
 PASS CTAP HID with fast data arrival in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/ctap-nfc-failure.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/ctap-nfc-failure.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/ctap-nfc-failure.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,5 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS CTAP NFC with empty apdu response in a mock nfc authenticator. 
 PASS CTAP NFC with wrong data error in a mock nfc authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/idl.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/idl.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/idl.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,5 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 Description
 
 This test verifies that the implementations of the WebAuthN API match with its WebIDL definition.

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,8 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with malicious payload in a mock hid authenticator. 
 PASS PublicKeyCredential's [[create]] with unsupported options in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,10 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with timeout in a mock hid authenticator. 
 PASS PublicKeyCredential's [[create]] with malicious payload in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,9 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with unsupported public key credential parameters in a mock local authenticator. 
 PASS PublicKeyCredential's [[create]] with matched exclude credentials in a mock local authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,12 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with unsupported public key credential parameters in a mock local authenticator. 
 PASS PublicKeyCredential's [[create]] with matched exclude credentials in a mock local authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,10 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with timeout in a mock nfc authenticator. 
 PASS PublicKeyCredential's [[create]] with no tags in a mock nfc authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,10 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with malformed APDU payload in a mock hid authenticator. 
 PASS PublicKeyCredential's [[create]] with malformed U2F register response in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,10 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with malformed APDU payload in a mock hid authenticator. 
 PASS PublicKeyCredential's [[create]] with malformed U2F register response in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,12 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with timeout 
 PASS PublicKeyCredential's [[create]] with a mismatched RP ID 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,16 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with minimum options in a mock hid authenticator. 
 PASS PublicKeyCredential's [[create]] with authenticatorSelection { 'cross-platform' } in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,11 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with minimum options in a mock local authenticator. 
 PASS PublicKeyCredential's [[create]] with authenticatorSelection { 'platform' } in a mock local authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,10 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with minimum options in a mock nfc authenticator. 
 PASS PublicKeyCredential's [[create]] with authenticatorSelection { 'cross-platform' } in a mock nfc authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,10 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
 
 PASS PublicKeyCredential's [[create]] with minimum options in a mock u2f authenticator. 
 PASS PublicKeyCredential's [[create]] with excludeCredentials in a mock u2f authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,8 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with malicious payload in a mock hid authenticator. 
 PASS PublicKeyCredential's [[get]] with unsupported options in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,10 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with timeout in a mock hid authenticator. 
 PASS PublicKeyCredential's [[get]] with malicious payload in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,6 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with no matched credentials in a mock local authenticator. 
 PASS PublicKeyCredential's [[get]] with no matched credentials in a mock local authenticator. 2nd 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,7 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with no matched credentials in a mock local authenticator. 
 PASS PublicKeyCredential's [[get]] with no matched credentials in a mock local authenticator. 2nd 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with timeout in a mock nfc authenticator. 
 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,6 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with malformed sign response in a mock hid authenticator. 
 PASS PublicKeyCredential's [[get]] with no matched allow credentials in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,8 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with malformed sign response in a mock hid authenticator. 
 PASS PublicKeyCredential's [[get]] with no matched allow credentials in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,12 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with timeout 
 PASS PublicKeyCredential's [[get]] with a mismatched RP ID 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,12 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with minimum options in a mock hid authenticator. 
 PASS PublicKeyCredential's [[get]] with matched allow credentials in a mock hid authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,5 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with minimum options in a mock local authenticator. 
 PASS PublicKeyCredential's [[get]] with matched allow credentials in a mock local authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,5 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with minimum options in a mock nfc authenticator. 
 PASS PublicKeyCredential's [[get]] with U2F in a mock nfc authenticator. 

Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt (264489 => 264490)


--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,14 @@
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
+CONSOLE MESSAGE: User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events.
 
 PASS PublicKeyCredential's [[get]] with minimum options in a mock hid authenticator. 
 PASS PublicKeyCredential's [[get]] with more allow credentials in a mock hid authenticator. 

Modified: trunk/Source/WebKit/ChangeLog (264489 => 264490)


--- trunk/Source/WebKit/ChangeLog	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/Source/WebKit/ChangeLog	2020-07-17 01:07:27 UTC (rev 264490)
@@ -1,3 +1,17 @@
+2020-07-16  Jiewen Tan  <[email protected]>
+
+        [WebAuthn] Add a console message: "User gesture is required to use the platform authenticator."
+        https://bugs.webkit.org/show_bug.cgi?id=214380
+        <rdar://problem/65300587>
+
+        Reviewed by Devin Rousso.
+
+        Covered by existing tests.
+
+        * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
+        (WebKit::WebAuthenticatorCoordinator::makeCredential):
+        (WebKit::WebAuthenticatorCoordinator::getAssertion):
+
 2020-07-16  Per Arne Vollan  <[email protected]>
 
         XPC connection should be suspended before setting target queue

Modified: trunk/Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp (264489 => 264490)


--- trunk/Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp	2020-07-17 01:00:45 UTC (rev 264489)
+++ trunk/Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp	2020-07-17 01:07:27 UTC (rev 264490)
@@ -32,6 +32,7 @@
 #include "WebAuthenticatorCoordinatorProxyMessages.h"
 #include "WebFrame.h"
 #include "WebPage.h"
+#include <_javascript_Core/ConsoleTypes.h>
 #include <WebCore/AuthenticatorResponseData.h>
 #include <WebCore/PublicKeyCredentialCreationOptions.h>
 #include <WebCore/PublicKeyCredentialRequestOptions.h>
@@ -51,7 +52,12 @@
     auto* webFrame = WebFrame::fromCoreFrame(frame);
     if (!webFrame)
         return;
-    m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::MakeCredential(webFrame->frameID(), webFrame->info(), hash, options, UserGestureIndicator::processingUserGesture()), WTFMove(handler));
+
+    auto processingUserGesture = UserGestureIndicator::processingUserGesture();
+    if (!processingUserGesture)
+        m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events."_s);
+
+    m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::MakeCredential(webFrame->frameID(), webFrame->info(), hash, options, processingUserGesture), WTFMove(handler));
 }
 
 void WebAuthenticatorCoordinator::getAssertion(const Frame& frame, const SecurityOrigin&, const Vector<uint8_t>& hash, const PublicKeyCredentialRequestOptions& options, RequestCompletionHandler&& handler)
@@ -59,7 +65,12 @@
     auto* webFrame = WebFrame::fromCoreFrame(frame);
     if (!webFrame)
         return;
-    m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::GetAssertion(webFrame->frameID(), webFrame->info(), hash, options, UserGestureIndicator::processingUserGesture()), WTFMove(handler));
+
+    auto processingUserGesture = UserGestureIndicator::processingUserGesture();
+    if (!processingUserGesture)
+        m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events."_s);
+
+    m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::GetAssertion(webFrame->frameID(), webFrame->info(), hash, options, processingUserGesture), WTFMove(handler));
 }
 
 void WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable(QueryCompletionHandler&& handler)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to