This is a part of the Credentials Management API / WebAuthn API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Authent...
They already support this for things like FIDO hardware keys and other biometric hardware. It's also supported by Firefox.