Credentials

Download OpenAPI specification:Download

Register and authenticate using WebAuthn APIs

Start registration

Start a registration of WebAuthn credentials for a specified user. This requires an authorized authentication session created by a server side call to /auth-session/start-with-authorization. If successful, the response will contain a credential_creation_options field that should be passed in the WebAuthn navigator.credentials.create() API call. Note that some fields (user.id and challenge) in the credential_creation_options object are base64 encoded and must first be decoded and converted to an array buffer. It is recommended to use the webauthn-json library that handles this.

Request
header Parameters
x-ts-device-binding-token
string

Device binding token, returned by the first client-side request from a device in the session (in the set-device-binding-token response header)

User-Agent
string

Browser user agent. Allows adding device info to sessions if provided

Request Body schema: application/json
required
auth_session_id
required
string

Session identifier that corresponds to an authorized session (created from the backend with an access token)

required
object (ApiWebAuthnRegisterStartUserInfo)
Responses
200

Active WebAuthn session info

400
401
404
409
post/v1/webauthn/register/start
Request samples
application/json
{
  • "auth_session_id": "string",
  • "user": {
    }
}
Response samples
application/json
{
  • "webauthn_session_id": "string",
  • "credential_creation_options": {
    }
}

Complete registration

Complete the WebAuthn credential registration, and obtain the authorization code to exchange for user tokens. It's required to provide the webauthn_session_id that was recieved in the registration start response. Note that some fields (clientDataJSON and attestationObject) must be converted from array buffer to base64 strings. If webauthn-json create() was used this is already taken care of.

Request
header Parameters
x-ts-device-binding-token
string

Device binding token, returned by the first client-side request from a device in the session (in the set-device-binding-token response header)

User-Agent
string

Browser user agent. Allows adding device info to sessions if provided

Request Body schema: application/json
required
auth_session_id
required
string

Session identifier

webauthn_session_id
required
string

WebAuthn session identifier

required
object (ApiWebAuthnRegisterCompleteDtoPublicKeyCredential)
double_signed_challenge
string

The WebAuthn challenge signed with the device public key, Encoded as Base64. Allowed signing algorithms: SHA-256, SHA-384, SHA-512

Responses
200

Complete WebAuthn session info

400
401
404
post/v1/webauthn/register/complete
Request samples
application/json
{
  • "auth_session_id": "string",
  • "webauthn_session_id": "string",
  • "public_key_credential": {
    },
  • "double_signed_challenge": "string"
}
Response samples
application/json
{
  • "credential": {
    },
  • "auth_code": "string"
}

Start authentication

Start a new webauthn authentication. This requires an authentication session, but it can be created from the client side without authorization by calling /auth-session/start-restricted. If successful, the response will contain a credential_request_options field that should be passed in the WebAuthn navigator.credentials.get() API call. Note that some fields (challenge and each id in the allowCredentials list) in the credential_request_options object are base64 encoded and must first be decoded and converted to array buffer, it is recommended to use the webauthn-json library that handles this.

Request
header Parameters
x-ts-device-binding-token
required
string

Device binding token, returned by the first client-side request from a device in the session (in the set-device-binding-token response header)

Request Body schema: application/json
required
auth_session_id
required
string

Session identifier

username
required
string

Name of user account, as used in the WebAuthn registration

Responses
200

Active WebAuthn session info

400
401
404
post/v1/webauthn/authenticate/start
Request samples
application/json
{
  • "auth_session_id": "string",
  • "username": "string"
}
Response samples
application/json
{
  • "webauthn_session_id": "string",
  • "credential_request_options": {
    }
}

Complete authentication

Complete the WebAuthn credential assertion, and obtain the authorization code to exchange for user tokens. It's required to provide the webauthn_session_id that was recieved in the authentication start response. Note that some fields in the public_key_credential.response object must be converted from array buffer to base64 strings (clientDataJSON, authenticatorData, signature and userHandle). If webauthn-json get() was used this is already taken care of.

Request
header Parameters
x-ts-device-binding-token
required
string

Device binding token, returned by the first client-side request from a device in the session (in the set-device-binding-token response header)

User-Agent
string

Browser user agent. Allows adding device info to sessions if provided

Request Body schema: application/json
required
auth_session_id
required
string

Session identifier

webauthn_session_id
required
string

WebAuthn session identifier

required
object

Information about the credential used for authentication

double_signed_challenge
string

The WebAuthn challenge signed with the device public key, Encoded as Base64. Allowed signing algorithms: SHA-256, SHA-384, SHA-512

Responses
200

Complete WebAuthn session info

400
401
404
post/v1/webauthn/authenticate/complete
Request samples
application/json
{
  • "auth_session_id": "string",
  • "webauthn_session_id": "string",
  • "public_key_credential": {
    },
  • "double_signed_challenge": "string"
}
Response samples
application/json
{
  • "auth_code": "string",
  • "credential": {
    }
}

Start passkey authentication

Start a new webauthn passkey authentication. This requires an authentication session, but it can be created from the client side without authorization by calling /auth-session/start-restricted. If successful, the response will contain a credential_request_options field that should be passed in the WebAuthn navigator.credentials.get() API call. Note that some fields (challenge and each id in the allowCredentials list) in the credential_request_options object are base64 encoded and must first be decoded and converted to array buffer, it is recommended to use the webauthn-json library that handles this.

Request
header Parameters
x-ts-device-binding-token
required
string

Device binding token, returned by the first client-side request from a device in the session (in the set-device-binding-token response header)

Request Body schema: application/json
required
auth_session_id
required
string

Session identifier

Responses
200

Active WebAuthn session info

400
401
404
post/v1/webauthn/authenticate/passkey/start
Request samples
application/json
{
  • "auth_session_id": "string"
}
Response samples
application/json
{
  • "webauthn_session_id": "string",
  • "credential_request_options": {
    }
}

Complete passkey authentication

Complete the WebAuthn credential assertion, and obtain the authorization code to exchange for user tokens. It's required to provide the webauthn_session_id that was recieved in the authentication start response. Note that some fields in the public_key_credential.response object must be converted from array buffer to base64 strings (clientDataJSON, authenticatorData, signature and userHandle). If webauthn-json get() was used this is already taken care of.

Request
header Parameters
x-ts-device-binding-token
required
string

Device binding token, returned by the first client-side request from a device in the session (in the set-device-binding-token response header)

User-Agent
string

Browser user agent. Allows adding device info to sessions if provided

Request Body schema: application/json
required
auth_session_id
required
string

Session identifier

webauthn_session_id
required
string

WebAuthn session identifier

required
object

Information about the credential used for authentication

Responses
200

Complete WebAuthn session info

400
401
404
post/v1/webauthn/authenticate/passkey/complete
Request samples
application/json
{
  • "auth_session_id": "string",
  • "webauthn_session_id": "string",
  • "public_key_credential": {
    }
}
Response samples
application/json
{
  • "auth_code": "string",
  • "credential": {
    }
}