MasterKale / SimpleWebAuthn

WebAuthn, Simplified. A collection of TypeScript-first libraries for simpler WebAuthn integration. Supports modern browsers, Node, Deno, and more.
https://simplewebauthn.dev
MIT License
1.61k stars 137 forks source link

Cannot Trigger FaceID Registration on Safari for iOS 14.4 #165

Closed ppoddar-affordably closed 3 years ago

ppoddar-affordably commented 3 years ago

Hi,

FaceID registration/authentication works end-to-end on my desktop Chrome browser on MacOS -- but when trying SimpleWebAuthn on Safari (iOS 14.4) on iPhone Xs, Face ID registration is not presented as an option (the only option is an external security key). I believe this could be an issue with the library because I was able to successfully trigger Face ID on the same device & browser when using the demo at https://webauthn.io/. See screenshots below.

I used attestation='none' and authenticatorAttachment='platform' for both my app and on webauth, but I am still seeing diverging behavior.

My App:

Screen Shot 2021-10-14 at 6 34 20 PM

IMG_9683

Webauthn.io Demo

Screen Shot 2021-10-14 at 6 35 52 PM

IMG_9684

Any ideas why this is and how I can trigger FaceID on iOS? Thanks!

ppoddar-affordably commented 3 years ago

Ah, I found out the reason. Apple requires user interaction to trigger Face ID so the prompt needs to be hidden behind a button press. Once I did this, FaceID triggered on my phone.

See https://stackoverflow.com/questions/67241714/how-to-use-webauthn-with-ios-and-react for more details