AuthenticatorAttestationResponse: getTransports() method

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since October 2023.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The getTransports() method of the AuthenticatorAttestationResponse interface returns an array of strings describing the different transports which may be used by the authenticator.

Such transports may be USB, NFC, BLE, internal (applicable when the authenticator is not removable from the device), or a hybrid approach. Sites should not interpret this array but instead store it along with the rest of the credential information. In a subsequent navigator.credentials.get() call, the transports value(s) specified inside publicKey.allowCredentials should be set to the stored array value. This provides a hint to the browser as to which types of authenticators to try when making an assertion for this credential.

Syntax

js
getTransports()

Parameters

None.

Return value

An Array of strings representing the different transports supported by the authenticator, in lexicographical order. Values may include:

"ble"

The authenticator may be used over BLE (Bluetooth Low Energy).

"hybrid"

The authenticator can be used over a combination of (often separate) data transport and proximity mechanisms. This supports, for example, authentication on a desktop computer using a smartphone.

"internal"

The authenticator is specifically bound to the client device (cannot be removed).

"nfc"

The authenticator may be used over NFC (Near Field Communication).

"usb"

The authenticator can be contacted over USB.

Examples

See Creating a public key credential for a detailed example.

Specifications

Specification
Web Authentication: An API for accessing Public Key Credentials - Level 3
# dom-authenticatorattestationresponse-gettransports

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
getTransports
Chrome – Full support
Chrome 74 (Release date: 2019-04-23)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 119 (Release date: 2023-10-24)
footnote Full support
Opera – Full support
Opera 62 (Release date: 2019-06-27)
footnote Full support
Safari – Full support
Safari 16 (Release date: 2022-09-12)
footnote Full support
Chrome Android – Full support
Chrome Android 74 (Release date: 2019-04-24)
footnote Full support
Firefox for Android – Full support
Firefox for Android 119 (Release date: 2023-10-24)
footnote Full support
Opera Android – Full support
Opera Android 53 (Release date: 2019-07-11)
footnote Full support
Safari on iOS – Full support
Safari on iOS 16 (Release date: 2022-09-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 11 (Release date: 2019-12-05)
footnote Full support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – Full support
WebView on iOS 16 (Release date: 2022-09-12)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support