问题
I was tasked with creating a custom enrollment screen for webauthn. We want to show the user that faceid will be used to authenticate them, or that their fingerprint will.
The solution of having a device table and deriving from that seems like a sustainability nightmare. I would much rather pull from something like navigator.credentials.authenticator.getDevice()
回答1:
The closest you're going to get is: https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable
You may also be able to infer what's available if you can get the OS version and device model somehow.
After enrollment you can use the FIDO2 MDS (metadata service) to retrieve information about that device, including the display name and icon. It may be some time before Apple AAGUIDs appear in the MDS though.
来源:https://stackoverflow.com/questions/63492633/webauthn-is-it-possible-to-see-the-available-platform-authenticators