I created a Webauthn authentication for my website. Now I'm trying to create a good interface for the best user experience. My users are not techies.
I'm interested in the fingerprint authentication as option. The webauthn via Yubico 2 or Google Titan keys is very rare in my users. When the users log in with email and password, I want to show a message like "Do you want to register your fingerprint for your next access? [Register now]".
I would like to show the message to the right users. So, how to decide in which cases show the message?
According to https://caniuse.com/#search=PublicKeyCredential, first of all I can use a test like this:
var support_webauthn = (typeof window['PublicKeyCredential'] !== "undefined")
This test determine if the browser supports the public keys authentication, but also passing the test I don't know if the hardware has a fingerprint sensor.
I know that the Android devices allows the Webauthn fingerprint authentication (instead of iPhone, for example). So, in addition of this I can check if the OS is Android
isAndroid = /android/i.test(navigator.userAgent);
But in this case I cannot show the message to the users with another supported device - e.g. with a Macbook pro (with the fingerprint sensor working).
How can I approach the issue?