@@ -45,11 +45,11 @@ Before prompting the user to create a new passkey, check if:
45
45
// Availability of `window.PublicKeyCredential` means WebAuthn is usable.
46
46
if (window .PublicKeyCredential &&
47
47
PublicKeyCredential .isUserVerifyingPlatformAuthenticatorAvailable &&
48
- PublicKeyCredential. isConditionalMediationAvailable) {
48
+ PublicKeyCredential .isConditionalMediationAvailable ) {
49
49
// Check if user verifying platform authenticator is available.
50
50
Promise .all ([
51
51
PublicKeyCredential .isUserVerifyingPlatformAuthenticatorAvailable (),
52
- PublicKeyCredential. isConditionalMediationAvailable (),
52
+ PublicKeyCredential .isConditionalMediationAvailable (),
53
53
]).then (results => {
54
54
if (results .every (r => r === true )) {
55
55
// Call WebAuthn creation
@@ -78,8 +78,8 @@ const publicKeyCredentialCreationOptions = {
78
78
pubKeyCredParams: [{alg: - 7 , type: " public-key" },{alg: - 257 , type: " public-key" }],
79
79
excludeCredentials: [{
80
80
id: ***** ,
81
- type: ' public-key' ,
82
- transports: [' internal' ],
81
+ type: " public-key" ,
82
+ transports: [" internal" ],
83
83
}],
84
84
authenticatorSelection: {
85
85
authenticatorAttachment: " platform" ,
@@ -132,7 +132,7 @@ The key parameters here are:
132
132
embedded into the platform device and the user will not be prompted to
133
133
insert an external authenticator such as a USB security key.
134
134
- [ ` authenticatorSelection.requireResidentKey ` ] ( https://w3c.github.io/webauthn/#dom-authenticatorselectioncriteria-residentkey ) :
135
- Set it to ` " true" ` . Requiring a discoverable credential (resident key)
135
+ Set it to ` true ` . Requiring a discoverable credential (resident key)
136
136
enables better sign-in experiences.
137
137
- [ ` excludeCredentials ` ] ( https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-excludecredentials ) :
138
138
Prevent registering the same authenticator by providing a list of already
0 commit comments