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

Included non-connected devices in device permission result #166

Open
odejesush opened this issue May 6, 2019 · 2 comments
Open

Included non-connected devices in device permission result #166

odejesush opened this issue May 6, 2019 · 2 comments

Comments

@odejesush
Copy link
Collaborator

Figure out the best way to allow sites to see all of the device permissions that they have, even if the devices are not currently connected to the system.

This could perhaps be done by extending getDevices() to have the option to return non-connected devices.

However, it also makes more sense for the Permissions API to return all permissions, including the ones for devices that are not currently connected to the system.

Implementing such a feature would enable developers to skip their permissions request UI if they already have permission to access a devices, and instead tell their users to connect the USB device supported by the site.

@mitchellwills
Copy link

This would definitely be helpful for applications to better understand whether a device, which they were previously granted access to, is missing or if the issue is related to a permission.
Another use case is for when devices may change modes, resulting in a change in product id, which would require an additional permission request. An API like this would allow the application to determine if the permission request is required and if not provide a more informative error to the user.

It would also be nice if the API included information about permissions granted by the browser through other means. For example, Chrome allows for granting of permissions through a group policy (https://bugs.chromium.org/p/chromium/issues/detail?id=854329#c32) and it would be nice if the effect of the policy (for the current site) was accessible through this API.

@yume-chan
Copy link

This could also enable developers to unpair/forget a currently disconnected device.

Now such device management feature can be emulated by saving every paired devices to localStorage, and ignore any "forgotten" devices from getDevices' result. However, users could unpair devices from browsers' permission settings and there is no method to sync that info.

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