Bug 214380 - [WebAuthn] Add a console message: "User gesture is required to use the platform authenticator."
Summary: [WebAuthn] Add a console message: "User gesture is required to use the platfo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks: 181943
  Show dependency treegraph
 
Reported: 2020-07-15 15:24 PDT by Jiewen Tan
Modified: 2020-07-16 18:07 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.35 KB, patch)
2020-07-15 15:29 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (37.41 KB, patch)
2020-07-15 17:37 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (38.13 KB, patch)
2020-07-16 11:33 PDT, Jiewen Tan
drousso: review+
Details | Formatted Diff | Diff
Patch for landing (50.25 KB, patch)
2020-07-16 17:22 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2020-07-15 15:24:00 PDT
Add a console message: "User gesture is required to use the platform authenticator." when the user gesture is not presented.
Comment 1 Jiewen Tan 2020-07-15 15:24:34 PDT
<rdar://problem/65300587>
Comment 2 Jiewen Tan 2020-07-15 15:29:25 PDT
Created attachment 404400 [details]
Patch
Comment 3 Jiewen Tan 2020-07-15 17:37:41 PDT
Created attachment 404407 [details]
Patch
Comment 4 Jiewen Tan 2020-07-16 11:33:33 PDT
Created attachment 404470 [details]
Patch
Comment 5 Devin Rousso 2020-07-16 12:22:18 PDT
Comment on attachment 404470 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404470&action=review

r=me

> Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:57
> +        m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is required to use the platform authenticator."_s);

Is there any way we can make this message more descriptive?  There's barely anything actionable here for a developer to use.  The fact that every log is the exact same in the LayoutTests is indicative of the problem :(

Also, can you add `#include <JavaScriptCore/ConsoleTypes.h>`?
Comment 6 Jiewen Tan 2020-07-16 17:17:16 PDT
Comment on attachment 404470 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404470&action=review

Thanks Devin for r+ this patch.

>> Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:57
>> +        m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is required to use the platform authenticator."_s);
> 
> Is there any way we can make this message more descriptive?  There's barely anything actionable here for a developer to use.  The fact that every log is the exact same in the LayoutTests is indicative of the problem :(
> 
> Also, can you add `#include <JavaScriptCore/ConsoleTypes.h>`?

Fixed the sentence and the header. Unfortunately, the web process doesn't have the necessary information to make a more fine grained message. Since this is a warning and for people that need it, it should be very clear for them. Therefore, the granularity here should be sufficient.
Comment 7 Jiewen Tan 2020-07-16 17:22:35 PDT
Created attachment 404501 [details]
Patch for landing
Comment 8 EWS 2020-07-16 18:07:32 PDT
Committed r264490: <https://trac.webkit.org/changeset/264490>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404501 [details].