DKBSignDocs

API reference

POSTPublic

Verify login WebAuthn

/api/v1/login/mfa/webauthn/verify

Complete the login challenge with a browser WebAuthn assertion. Success is the same as password login (user + access_token).

Path parameters

This endpoint has no path parameters.

Query parameters

This endpoint has no query parameters.

Request body

FieldTypeDescription
challenge_token
Required
stringChallenge token returned by login.
e.g. "opaque-challenge"
credential
Required
objectWebAuthn assertion from the authenticator.
e.g. {"id":"credential-id","rawId":"credential-id","type":"public-key","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0In0","authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2MFAAAAAA","signature":"MEUCIQDexample","userHandle":"dXNlci1oYW5kbGU"}}

Responses

StatusMeaning
200Logged in successfully
401Missing or invalid Bearer token.

Request

curl
curl -X POST 'https://api.dkbsigns.com/api/v1/login/mfa/webauthn/verify' \
  -H 'Content-Type: application/json' \
  -d '{"challenge_token":"opaque-challenge","credential":{"id":"credential-id","rawId":"credential-id","type":"public-key","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0In0","authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2MFAAAAAA","signature":"MEUCIQDexample","userHandle":"dXNlci1oYW5kbGU"}}}'

Response 200

json
{
  "status": "success",
  "message": "Logged in successfully",
  "data": {
    "user": {
      "id": 4,
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "user@acme.test",
      "role": "user",
      "company_id": 1,
      "job_title": "Chief Financial Officer",
      "locale": "fr",
      "seal": null,
      "signature_mentions": {
        "enabled": true,
        "frame": false,
        "mentions": [
          "fullName",
          "jobTitle"
        ]
      },
      "is_available": true
    },
    "access_token": "1|abcdefghijklmnopqrstuvwxyz"
  }
}