So I want to use a flash drive as an option for 2FA on my website(using the devices serial umber). I am using WebUSB, but the flash drive won't show up in the device selection window. I have seen that web USB can't read/write files, so can it even see flash drives?
Here's my code if it helps:
console.log("test");
usbLookup.addEventListener('click', function() {
navigator.usb.requestDevice({ filters: [{ }] })
.then(device => {
console.log(device.serialNumber);
})
.catch(error => { console.log(error); });
});
<iframe allowpaymentrequest allow='usb'></iframe>
<a id="usbLookup">Get Serial</a>