W3cubDocs

/Web APIs

AuthenticatorAttestationResponse: getTransports() method

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

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
getTransports 74 79 No No 62 16 No 74 No 53 16 11.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse/getTransports