-
Meet Face ID and Touch ID for the web
Face ID and Touch ID provide a frictionless experience when logging in — and now you can use them on your websites in Safari with the Web Authentication API. Discover how to add this convenient and secure login alternative to your website.
Recursos
Vídeos relacionados
WWDC20
-
Buscar neste vídeo...
-
-
7:44 - Feature detection
// Feature detection const isAvailable = await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(); if (isAvailable) { // Continue to enrollment or sign in // ... } -
8:42 - Enrollment
// Enrollment const options = { publicKey: { rp: { name: "example.com" }, user: { name: "john.appleseed@example.com", id: userIdBuffer, displayName: "John Appleseed" }, pubKeyCredParams: [ { type: "public-key", alg: -7 } ], challenge: challengeBuffer, authenticatorSelection: { authenticatorAttachment: "platform" }, attestation: "direct" } }; const publicKeyCredential = await navigator.credentials.create(options); -
11:42 - Sign in
// Sign in const options = { publicKey: { challenge: challengeBuffer, allowCredentials: [{ type: "public-key", id: credentialIdBuffer, transports: ["internal"] }] } }; const publicKeyCredential = await navigator.credentials.get(options);
-