Skip to main content
POST
/
auth
/
credentials
/
code
/
init
Create Credential Challenge With Code
curl --request POST \
  --url https://api.dfns.io/auth/credentials/code/init \
  --header 'Content-Type: application/json' \
  --data '{
  "credentialKind": "Fido2",
  "code": "<string>"
}'
{
  "kind": "Fido2",
  "user": {
    "id": "<string>",
    "displayName": "<string>",
    "name": "<string>"
  },
  "challengeIdentifier": "<string>",
  "challenge": "<string>",
  "rp": {
    "id": "<string>",
    "name": "<string>"
  },
  "authenticatorSelection": {
    "authenticatorAttachment": "platform",
    "residentKey": "required",
    "requireResidentKey": true,
    "userVerification": "required"
  },
  "attestation": "none",
  "pubKeyCredParams": [
    {
      "type": "public-key",
      "alg": 123
    }
  ],
  "excludeCredentials": [
    {
      "type": "public-key",
      "id": "<string>"
    }
  ],
  "temporaryAuthenticationToken": "<string>"
}

Authentication

No authentication required.

Required Permissions

No authentication required.

Body

application/json
credentialKind
enum<string>
required
Available options:
Fido2,
Key,
Password,
Totp,
RecoveryKey,
PasswordProtectedKey
code
string
required
Minimum length: 1

Response

200 - application/json

Success

  • Fido2/Passkeys
  • Public/Private key pair
  • Password-protected Key
  • Recovery Credentials
  • <Deprecated> Password
  • <Deprecated> TOTP

Fido2 Credential, also known as Passkeys or WebauthN credential.

kind
enum<string>
required
Available options:
Fido2
user
object
required
challengeIdentifier
string
required
challenge
string
required
authenticatorSelection
object
required
attestation
enum<string>
required
Available options:
none,
indirect,
direct,
enterprise
pubKeyCredParams
object[]
required
excludeCredentials
object[]
required
temporaryAuthenticationToken
string
required

@deprecated use challengeIdentifier instead

rp
object
I