Retrieve a Passkey API

On this page

Use this API to retrieve information about a single WebAuthn passkeyA credential that replaces a password with a key pair stored on the user's device. Passkeys use the WebAuthn standard. or all of a user's registered passkeys. Retrieving passkeys doesn't require a license, unlike the other WebAuthn APIs.

Request#

Retrieve a Single Passkey#

API Key Authentication
Retrieve a single Passkey by Id
GET/api/webauthn/{id}
OpenAPI Spec

Request Headers#

X-FusionAuth-TenantId
  • Type: String
  • Optional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon other values in the request or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Path Parameters#

id
  • Type: UUID
  • Required

The unique Id of the WebAuthn passkey to retrieve.

Retrieve All Passkeys for a User#

API Key Authentication
Retrieve all Passkeys belonging to a User
GET/api/webauthn?userId={userId}
OpenAPI Spec

Request Headers#

X-FusionAuth-TenantId
  • Type: String
  • Optional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon other values in the request or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Query Parameters#

userId
  • Type: UUID
  • Required

The unique Id of the User to retrieve WebAuthn passkeys for. Required if id is omitted.

Response#

The response for this API contains either all of the Passkeys belonging to a User, or a single Passkey.

Response Codes
CodeDescription
200The request succeeded. The response contains a JSON body.
400The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present.
401FusionAuth didn't authorize the request. The Authorization header is missing, the API key isn't valid, or the API key doesn't have permission for this endpoint and method. The response is empty. For more information, see Unauthorized Responses.
404The object you requested doesn't exist. The response is empty.
500FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response is empty.
503The search index is unavailable or returned an error, so FusionAuth can't complete the request. The response contains a JSON body.

Single Passkey Response Body#

credential.algorithm
  • Type: Long

The identifier for the signing algorithm used with the passkey. These values are defined by the IANA COSE Algorithms registry. FusionAuth supports a subset of these algorithms.

Supported algorithms

Name Value Description
RS256 -257 RSASSA-PKCS1-v1_5 using SHA-256
RS384 -258 RSASSA-PKCS1-v1_5 using SHA-384
RS512 -259 RSASSA-PKCS1-v1_5 using SHA-512
PS256 -37 RSASSA-PSS w/ SHA-256
PS384 -38 RSASSA-PSS w/ SHA-384
PS512 -39 RSASSA-PSS w/ SHA-512
ES256 -7 ECDSA w/ SHA-256
ES384 -35 ECDSA w/ SHA-384
ES512 -36 ECDSA w/ SHA-512
credential.attestationType
  • Type: String

The type of attestation provided when the passkey was registered. Passkeys registered in FusionAuth will have a value of none. Imported passkeys may have another value.

credential.authenticatorSupportsUserVerification
  • Type: Boolean

Indicates whether this authenticator supports user verification. User verification ensures that the user is authorized to use the authenticator.

This value is currently determined by whether user verification occurred during the registration of this passkey rather than by other means, such as examining FIDO authenticator metadata.

credential.credentialId
  • Type: String

The credential Id generated by the authenticator is stored as a base64url-encoded string. This value is used by authenticators to look up a passkey during an authentication ceremony and to prevent multiple passkeys from being registered on the same authenticator for a single user.

credential.data
  • Type: Object

An object that can hold any information about the passkey that should be persisted.

credential.discoverable
  • Type: Boolean

Indicates whether the passkey is "client-side discoverable." Discoverable passkeys can be used in authentication ceremonies without first identifying the user (e.g. by requiring the user to complete a form field).

credential.displayName
  • Type: String

The display name for the passkey selected during registration. This value should have been selected by the user.

credential.id
  • Type: UUID

The unique identifier for this passkey.

credential.insertInstant
  • Type: Long

The instant that the passkey was added to the FusionAuth database.

credential.lastUseInstant
  • Type: Long

The instant that the passkey was last used to complete a WebAuthn ceremony.

credential.name
  • Type: String

A unique name meant to disambiguate passkeys with the same credential.displayName.

credential.publicKey
  • Type: String

The passkey's public key, encoded in PEM format.

credential.relyingPartyId
  • Type: String

The Relying Party Id used at the time the passkey was registered.

credential.signCount
  • Type: Integer

A signature counter for the passkey. The signature count can be used by a Relying Party to identify a cloned or malfunctioning authenticator.

credential.tenantId
  • Type: UUID

The Id of the tenant to which this passkey belongs.

credential.transports
  • Type: Array<String>

A list of transport types supported by the authenticator that generated the passkey. This value is used as a hint to help identify eligible authenticators during a WebAuthn ceremony.

FusionAuth treats the list of transports as strings to maximize authenticator compatibility. These values are used as hints during WebAuthn ceremonies and missing, extra, or unexpected values should not cause a ceremony to fail. Some common values are:

  • internal - the authenticator is integrated with the client device
  • usb - the authenticator can be contacted over USB
  • nfc - the authenticator can be contacted over Near Field Communication (NFC)
  • ble - the authenticator can be contacted over Bluetooth Smart (Bluetooth Low Energy, or BLE)
  • cable - "cloud-assisted" BLE. This transport is used for Android devices acting as an authenticator connected to the computer over Bluetooth
  • hybrid - replacement for the cable transport
credential.userAgent
  • Type: String

The user agent at the time the passkey was registered. This can be useful for troubleshooting purposes.

credential.userId
  • Type: UUID

The Id of the user that this passkey belongs to.

Example Response JSON
{
  "credential": {
    "algorithm": -7,
    "attestationType": "none",
    "authenticatorSupportsUserVerification": true,
    "credentialId": "HdN9wqP9mqOonacmiM2gIjASFYg",
    "data": {},
    "displayName": "Chrome Touch ID",
    "name": "richard@fusionauth.io",
    "id": "c664318a-2384-4c35-9475-9a200e1d3b72",
    "insertInstant": 1668011701792,
    "discoverable": false,
    "lastUseInstant": 1668021630599,
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEz9DI9AQfZn1aDJG5sw3Ckl7SoQ7E\nLPElDoJMijphvVigTcNMTc8H9Xptl8B20QHMOXGTzaUxLGNY1c8yhw9VVA==\n-----END PUBLIC KEY-----",
    "relyingPartyId": "piedpiper.com",
    "signCount": 41,
    "tenantId": "30663132-6464-6665-3032-326466613934",
    "transports": [
      "internal"
    ],
    "userId": "703fe2d2-2d39-4cb7-b76d-0b9918ed2457"
  }
}
Response Codes
CodeDescription
200The request succeeded. The response contains a JSON body.
400The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present.
401FusionAuth didn't authorize the request. The Authorization header is missing, the API key isn't valid, or the API key doesn't have permission for this endpoint and method. The response is empty. For more information, see Unauthorized Responses.
404The object you requested doesn't exist. The response is empty.
500FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response is empty.
503The search index is unavailable or returned an error, so FusionAuth can't complete the request. The response contains a JSON body.

All Passkeys for a User Response Body#

credentials[x]
  • Type: Array

The list of WebAuthn Passkey objects.

credentials[x].algorithm
  • Type: Long

The identifier for the signing algorithm used with the passkey. These values are defined by the IANA COSE Algorithms registry. FusionAuth supports a subset of these algorithms.

Supported algorithms

Name Value Description
RS256 -257 RSASSA-PKCS1-v1_5 using SHA-256
RS384 -258 RSASSA-PKCS1-v1_5 using SHA-384
RS512 -259 RSASSA-PKCS1-v1_5 using SHA-512
PS256 -37 RSASSA-PSS w/ SHA-256
PS384 -38 RSASSA-PSS w/ SHA-384
PS512 -39 RSASSA-PSS w/ SHA-512
ES256 -7 ECDSA w/ SHA-256
ES384 -35 ECDSA w/ SHA-384
ES512 -36 ECDSA w/ SHA-512
credentials[x].attestationType
  • Type: String

The type of attestation provided when the passkey was registered. Passkeys registered in FusionAuth will have a value of none. Imported passkeys may have another value.

credentials[x].authenticatorSupportsUserVerification
  • Type: Boolean

Indicates whether this authenticator supports user verification. User verification ensures that the user is authorized to use the authenticator.

This value is currently determined by whether user verification occurred during the registration of this passkey rather than by other means, such as examining FIDO authenticator metadata.

credentials[x].credentialId
  • Type: String

The credential Id generated by the authenticator is stored as a base64url-encoded string. This value is used by authenticators to look up a passkey during an authentication ceremony and to prevent multiple passkeys from being registered on the same authenticator for a single user.

credentials[x].data
  • Type: Object

An object that can hold any information about the passkey that should be persisted.

credentials[x].discoverable
  • Type: Boolean

Indicates whether the passkey is "client-side discoverable." Discoverable passkeys can be used in authentication ceremonies without first identifying the user (e.g. by requiring the user to complete a form field).

credentials[x].displayName
  • Type: String

The display name for the passkey selected during registration. This value should have been selected by the user.

credentials[x].id
  • Type: UUID

The unique identifier for this passkey.

credentials[x].insertInstant
  • Type: Long

The instant that the passkey was added to the FusionAuth database.

credentials[x].lastUseInstant
  • Type: Long

The instant that the passkey was last used to complete a WebAuthn ceremony.

credentials[x].name
  • Type: String

A unique name meant to disambiguate passkeys with the same credential.displayName.

credentials[x].publicKey
  • Type: String

The passkey's public key, encoded in PEM format.

credentials[x].relyingPartyId
  • Type: String

The Relying Party Id used at the time the passkey was registered.

credentials[x].signCount
  • Type: Integer

A signature counter for the passkey. The signature count can be used by a Relying Party to identify a cloned or malfunctioning authenticator.

credentials[x].tenantId
  • Type: UUID

The Id of the tenant to which this passkey belongs.

credentials[x].transports
  • Type: Array<String>

A list of transport types supported by the authenticator that generated the passkey. This value is used as a hint to help identify eligible authenticators during a WebAuthn ceremony.

FusionAuth treats the list of transports as strings to maximize authenticator compatibility. These values are used as hints during WebAuthn ceremonies and missing, extra, or unexpected values should not cause a ceremony to fail. Some common values are:

  • internal - the authenticator is integrated with the client device
  • usb - the authenticator can be contacted over USB
  • nfc - the authenticator can be contacted over Near Field Communication (NFC)
  • ble - the authenticator can be contacted over Bluetooth Smart (Bluetooth Low Energy, or BLE)
  • cable - "cloud-assisted" BLE. This transport is used for Android devices acting as an authenticator connected to the computer over Bluetooth
  • hybrid - replacement for the cable transport
credentials[x].userAgent
  • Type: String

The user agent at the time the passkey was registered. This can be useful for troubleshooting purposes.

credentials[x].userId
  • Type: UUID

The Id of the user that this passkey belongs to.

Example Response JSON
{
  "credentials": [
    {
      "algorithm": -7,
      "attestationType": "none",
      "authenticatorSupportsUserVerification": true,
      "credentialId": "HdN9wqP9mqOonacmiM2gIjASFYg",
      "data": {},
      "displayName": "Chrome Touch ID",
      "name": "richard@fusionauth.io",
      "id": "c664318a-2384-4c35-9475-9a200e1d3b72",
      "insertInstant": 1668011701792,
      "discoverable": false,
      "lastUseInstant": 1668021630599,
      "publicKey": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEz9DI9AQfZn1aDJG5sw3Ckl7SoQ7E\nLPElDoJMijphvVigTcNMTc8H9Xptl8B20QHMOXGTzaUxLGNY1c8yhw9VVA==\n-----END PUBLIC KEY-----",
      "relyingPartyId": "piedpiper.com",
      "signCount": 41,
      "tenantId": "30663132-6464-6665-3032-326466613934",
      "transports": [
        "internal"
      ],
      "userId": "703fe2d2-2d39-4cb7-b76d-0b9918ed2457"
    }
  ]
}