Skip to content

Start authentication

Request

Start a new WebAuthn authentication. If successful, the response contains a credential_request_options field that should be passed to the WebAuthn navigator.credentials.get() API call. Note that some fields, such as challenge and each id in the allowCredentials list, are binary values represented as base64url-encoded strings. Before calling the WebAuthn API, parse the options using PublicKeyCredential.parseRequestOptionsFromJSON().

Bodyapplication/jsonrequired
One of:
client_idstringrequired

The client ID of the application the user is trying to authenticate to.

timeoutnumber

The timeout in seconds for the authentication modal. Must be between 30 and 600. Default is 300 seconds.

approval_dataobject

Flat object that contains the data that your customer should approve for a transaction signing or custom approval flow. It can contain up to 10 keys, and only alphanumeric characters, underscores, hyphens, and periods. It will be returned as a claim in the ID token upon successful authentication.

Example:
{ "transaction_id": "eFII2y40uB9hQ98nXt3tc1IHkRt8GrRZiqZuRn_59wT", "sum": "200" }
identifierstringrequired

Identifier value (email, phone number, user ID, or custom identifier)

Example:"name@example.com"
identifier_typestringrequired

Type of identifier (email, phone_number, user_id, username, or custom identifier type)

Example:"email"
curl -i -X POST \
  https://api.sbx.transmitsecurity.io/cis/v1/auth/webauthn/authenticate/start \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "string",
    "timeout": 0,
    "approval_data": {
      "transaction_id": "eFII2y40uB9hQ98nXt3tc1IHkRt8GrRZiqZuRn_59wT",
      "sum": "200"
    },
    "identifier": "name@example.com",
    "identifier_type": "email"
  }'

Responses

Authentication options

Bodyapplication/json
webauthn_session_idstringrequired

WebAuthn session identifier

credential_request_optionsobjectrequired
Response
{ "webauthn_session_id": "string", "credential_request_options": { "allowCredentials": [], "rawChallenge": "string", "challenge": "string", "timeout": 0, "rpId": "string", "attestation": "none", "userVerification": "preferred", "extensions": {} } }