Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new filter option to exclude already-authorized devices #49

Open
yoichiro opened this issue Jan 13, 2021 · 2 comments
Open

A new filter option to exclude already-authorized devices #49

yoichiro opened this issue Jan 13, 2021 · 2 comments

Comments

@yoichiro
Copy link

I want to add a new filter option to exclude already-authorized devices for the requestDevice method.

dictionary HIDDeviceFilter {
    unsigned long vendorId;
    unsigned short productId;
    unsigned short usagePage;
    unsigned short usage;
    boolean excludeAuthorisedDevices;  // <- New filter option
};

Currently, there is no such option. Therefore, users see all connected devices including devices which was already authorized on the dialog opened by calling the requestDevice method.

In the other hand, we can get all authorized devices by calling the getDevices method. Generally, most apps should call the getDevices method at launching for the purpose of displaying a device list, I guess. Also, most apps should keep and manage the list of authorized devices.

If a user selects already-authorized devices from the dialog opened by calling the requestDevice method, we need to check whether the selected device is included in the list of the result retrieved from calling getDevices method or not. However, if there is an option to exclude already-authorized devices from the device list on the dialog opened by calling the requestDevice method, it is unnecessary.

@nondebug
Copy link
Collaborator

nondebug commented Apr 6, 2021

This seems like a nice improvement that would also benefit other APIs that use a chooser-based permission dialog. (WebUSB, Serial, etc)

@beaufortfrancois
Copy link
Contributor

It seems like the exclusionFilters option proposal at #93 could help as well with this feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants