I'm using Safari Technology Preview 109 on the MacOS 11 beta, on a 16" MacBook Pro. Unfortunately, I am unable to get the browser to ask for Touch ID. Instead, Safari will always ask for a security key:
Do you want to allow “localhost” to start using a security key to sign in?
Insert your security key and activate it to continue.
I have the "Web Authentication" and "When Authentication Local Authenticator" experimental features enabled. The web server is running on localhost. I'm using the code as shown in wwdc20-10670, except I'm not using attestation. I've never had a security key connected to this Mac either.
My code is this:
What am I missing to get Safari to ask for Touch ID instead of a security key? If I'm reading the release notes for Preview 109 correctly, Touch ID should be working:
Do you want to allow “localhost” to start using a security key to sign in?
Insert your security key and activate it to continue.
I have the "Web Authentication" and "When Authentication Local Authenticator" experimental features enabled. The web server is running on localhost. I'm using the code as shown in wwdc20-10670, except I'm not using attestation. I've never had a security key connected to this Mac either.
My code is this:
Code Block ts const challengeBuffer = Uint8Array.from("XXXXXX", c => c.charCodeAt(0)) const options = { publicKey: { rp: { name: "localhost" }, user: { name: user.email, id: Uint8Array.from(String(user.id), c => c.charCodeAt(0)), displayName: user.displayName }, pubKeyCredParams: [{ type: "public-key", alg: -7 }], challenge: challengeBuffer, authenticatorSelection: { authenticatorAttachment: "platform" }, } } const publicKeyCredential = await navigator.credentials.create(options);
What am I missing to get Safari to ask for Touch ID instead of a security key? If I'm reading the release notes for Preview 109 correctly, Touch ID should be working:
*Web Authentication.* Added a Web Authentication platform authenticator using Touch ID, if that capability is present (macOS Big Sur-only). [...]