Post

Replies

Boosts

Views

Activity

Reply to Safari will ask for security key instead of Touch ID when using Web Authentication
This example works for me: <input type="submit" id="MyButton"> <script> 		async function webauthnCheck() { 				if (await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()) { 						document.getElementById('MyButton').onclick = async function(event){ 								event.preventDefault(); 								const options = { 										publicKey: { 												rp: { 														name: 'mydomain.tld' 												}, 												user: { 														id: Uint8Array.from("XXXXXX", c => c.charCodeAt(0)), 														name: 'test', 														displayName: 'Test User' 												}, 												challenge: Uint8Array.from('XXXXXX', c => c.charCodeAt(0)), 												pubKeyCredParams: [ 														{ 																type: 'public-key', 																alg: -7 														} 												], 												timeout: 15000 										} 								} 								navigator.credentials.create(options).then(function (publicKeyCredential) { 										console.log(publicKeyCredential); 								}) 						} 				} 		} 		webauthnCheck(); </script>
Jul ’20