mozilla / authenticator-rs

Rust library to interact with Security Keys, used by Firefox
https://crates.io/crates/authenticator
Mozilla Public License 2.0
273 stars 70 forks source link

Detect if no devices are connected and send a StatusUpdate accordingly. #315

Open msirringhaus opened 10 months ago

msirringhaus commented 10 months ago

Try to fix #312

This is not working for macOS, as I have no idea how to get the already plugged in devices (and if none are plugged in, an empty list) on that platform.

Upon start, we make the Monitor send DevicesAdded with an empty list, to let the DeviceSelector know we are starting and have no device yet. Then whenever devices are removed (either by sending NotAToken or being physically plugged out), we check if it was the last one. If so, we send the StatusUpdate accordingly.

jschanck commented 9 months ago

Unfortunately I don't think we can accept this until we have a solution for macOS (Firefox is going to stick with auth-rs for security keys on macOS for the foreseeable future). Should I try to find someone who can help us debug the macOS issue?

msirringhaus commented 6 months ago

Unfortunately I don't think we can accept this until we have a solution for macOS (Firefox is going to stick with auth-rs for security keys on macOS for the foreseeable future). Should I try to find someone who can help us debug the macOS issue?

Sorry, it totally missed the question in there, and read it as a statement. Yes, it would be great if you could find somebody who knows the macOS SDK and how things work there.