Methods

Chrome DevTools

WebAuthn.addCredential #

Adds the credential to the specified authenticator.

Parameters

authenticatorId
credential

Chrome DevTools

WebAuthn.addVirtualAuthenticator #

Creates and adds a virtual authenticator.

Parameters

Return object

authenticatorId

Chrome DevTools

WebAuthn.clearCredentials #

Clears all the credentials from the specified device.

Parameters

authenticatorId

Chrome DevTools

WebAuthn.disable #

Disable the WebAuthn domain.


Chrome DevTools

WebAuthn.enable #

Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.

Parameters

enableUI
Optional
boolean

Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.


Chrome DevTools

WebAuthn.getCredential #

Returns a single credential stored in the given virtual authenticator that matches the credential ID.

Parameters

authenticatorId
credentialId
string

Return object

credential

Chrome DevTools

WebAuthn.getCredentials #

Returns all the credentials stored in the given virtual authenticator.

Parameters

authenticatorId

Return object

credentials
array[ Credential ]

Chrome DevTools

WebAuthn.removeCredential #

Removes a credential from the authenticator.

Parameters

authenticatorId
credentialId
string

Chrome DevTools

WebAuthn.removeVirtualAuthenticator #

Removes the given authenticator.

Parameters

authenticatorId

Chrome DevTools

WebAuthn.setAutomaticPresenceSimulation #

Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.

Parameters

authenticatorId
enabled
boolean

Chrome DevTools

WebAuthn.setCredentialProperties #

Allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties

Parameters

authenticatorId
credentialId
string
backupEligibility
Optional
boolean
backupState
Optional
boolean

Chrome DevTools

WebAuthn.setResponseOverrideBits #

Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.

Parameters

authenticatorId
isBogusSignature
Optional
boolean

If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false.

isBadUV
Optional
boolean

If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false.

isBadUP
Optional
boolean

If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.


Chrome DevTools

WebAuthn.setUserVerified #

Sets whether User Verification succeeds or fails for an authenticator. The default is true.

Parameters

authenticatorId
isUserVerified
boolean

Events

Chrome DevTools

WebAuthn.credentialAdded #

Triggered when a credential is added to an authenticator.

Parameters

authenticatorId
credential

Chrome DevTools

WebAuthn.credentialAsserted #

Triggered when a credential is used in a webauthn assertion.

Parameters

authenticatorId
credential

Types

Chrome DevTools

WebAuthn.AuthenticatorId #

Type: string


Chrome DevTools

WebAuthn.AuthenticatorProtocol #

Type: string

Allowed values: u2f, ctap2


Chrome DevTools

WebAuthn.AuthenticatorTransport #

Type: string

Allowed values: usb, nfc, ble, cable, internal


Chrome DevTools

WebAuthn.Credential #

Type: object

Properties

credentialId
string
isResidentCredential
boolean
rpId
Optional
string

Relying Party ID the credential is scoped to. Must be set when adding a credential.

privateKey
string

The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON)

userHandle
Optional
string

An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user. (Encoded as a base64 string when passed over JSON)

signCount
integer

Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter

largeBlob
Optional
string

The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON)

backupEligibility
Optional
boolean

Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.

backupState
Optional
boolean

Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.


Chrome DevTools

WebAuthn.Ctap2Version #

Type: string

Allowed values: ctap2_0, ctap2_1


Chrome DevTools

WebAuthn.VirtualAuthenticatorOptions #

Type: object

Properties

ctap2Version
Optional
Ctap2Version

Defaults to ctap2_0. Ignored if |protocol| == u2f.

hasResidentKey
Optional
boolean

Defaults to false.

hasUserVerification
Optional
boolean

Defaults to false.

hasLargeBlob
Optional
boolean

If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.

hasCredBlob
Optional
boolean

If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.

hasMinPinLength
Optional
boolean

If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.

hasPrf
Optional
boolean

If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.

automaticPresenceSimulation
Optional
boolean

If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.

isUserVerified
Optional
boolean

Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.

defaultBackupEligibility
Optional
boolean

Credentials created by this authenticator will have the backup eligibility (BE) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup

defaultBackupState
Optional
boolean

Credentials created by this authenticator will have the backup state (BS) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup